feat: add cli option to open the log view on startup
This commit is contained in:
parent
4970f29905
commit
a056a54104
2 changed files with 8 additions and 0 deletions
|
@ -62,6 +62,8 @@ pub fn create(a: std.mem.Allocator, n: nc.Plane) !Widget {
|
|||
self.resize();
|
||||
if (tp.env.get().is("show-input"))
|
||||
self.toggle_inputview_async();
|
||||
if (tp.env.get().is("show-log"))
|
||||
self.toggle_logview_async();
|
||||
return w;
|
||||
}
|
||||
|
||||
|
@ -339,6 +341,10 @@ fn create_editor(self: *Self) tp.result {
|
|||
self.resize();
|
||||
}
|
||||
|
||||
fn toggle_logview_async(_: *Self) void {
|
||||
tp.self_pid().send(.{ "cmd", "toggle_logview" }) catch return;
|
||||
}
|
||||
|
||||
fn toggle_inputview_async(_: *Self) void {
|
||||
tp.self_pid().send(.{ "cmd", "toggle_inputview" }) catch return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue