feat: add cli option to open the input view on start
This commit is contained in:
parent
61610f579a
commit
21bac1ab0c
2 changed files with 8 additions and 0 deletions
|
@ -57,6 +57,8 @@ pub fn create(a: std.mem.Allocator, n: nc.Plane) !Widget {
|
|||
try widgets.add(try Widget.empty(a, n, .dynamic));
|
||||
self.statusbar = try widgets.addP(try @import("status/statusbar.zig").create(a, w));
|
||||
self.resize();
|
||||
if (tp.env.get().is("show-input"))
|
||||
self.toggle_inputview_async();
|
||||
return w;
|
||||
}
|
||||
|
||||
|
@ -335,6 +337,10 @@ fn create_editor(self: *Self) tp.result {
|
|||
self.resize();
|
||||
}
|
||||
|
||||
fn toggle_inputview_async(_: *Self) void {
|
||||
tp.self_pid().send(.{ "cmd", "toggle_inputview" }) catch return;
|
||||
}
|
||||
|
||||
fn show_home_async(_: *Self) void {
|
||||
tp.self_pid().send(.{ "cmd", "show_home" }) catch return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue