feat: quit when closing last open split
This commit is contained in:
parent
27bdd64f88
commit
407d5fa888
2 changed files with 3 additions and 1 deletions
|
|
@ -778,6 +778,8 @@ const cmds = struct {
|
|||
pub const add_split_meta: Meta = .{ .description = "Add split view" };
|
||||
|
||||
pub fn close_split(self: *Self, _: Ctx) Result {
|
||||
if (self.views.widgets.items.len == 1)
|
||||
return command.executeName("quit", .{});
|
||||
return self.remove_active_view();
|
||||
}
|
||||
pub const close_split_meta: Meta = .{ .description = "Close split view" };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue