Compare commits
No commits in common. "407d5fa8889110b70ddef8421b4688f8923c7b0a" and "6502989fb846b8accb9dadc496a47f83799c8575" have entirely different histories.
407d5fa888
...
6502989fb8
2 changed files with 2 additions and 21 deletions
|
|
@ -8,13 +8,9 @@
|
|||
["f1", "open_help"],
|
||||
["ctrl+\\", "add_split"],
|
||||
["ctrl+k w", "close_split"],
|
||||
["ctrl+1", "focus_split", 0],
|
||||
["ctrl+2", "focus_split", 1],
|
||||
["ctrl+3", "focus_split", 2],
|
||||
["ctrl+4", "focus_split", 3],
|
||||
["ctrl+j", "toggle_panel"],
|
||||
["ctrl+q", "quit"],
|
||||
["ctrl+w", "close_split"],
|
||||
["ctrl+w", "quit"],
|
||||
["ctrl+o", "open_file"],
|
||||
["ctrl+e", "open_recent"],
|
||||
["alt+o", "open_previous_file"],
|
||||
|
|
@ -40,6 +36,7 @@
|
|||
["alt+f11", "toggle_color_scheme"],
|
||||
["f12", "toggle_inputview"],
|
||||
["alt+!", "run_task"],
|
||||
["ctrl+1", "add_task"],
|
||||
["ctrl+tab", "next_tab"],
|
||||
["ctrl+shift+g", "show_vcs_status"],
|
||||
["ctrl+shift+tab", "previous_tab"],
|
||||
|
|
|
|||
|
|
@ -778,26 +778,10 @@ 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" };
|
||||
|
||||
pub fn focus_split(self: *Self, ctx: Ctx) Result {
|
||||
var n: usize = undefined;
|
||||
if (!try ctx.args.match(.{tp.extract(&n)})) return error.InvalidFocusSplitArgument;
|
||||
|
||||
if (n > self.views.widgets.items.len) return;
|
||||
if (n == self.views.widgets.items.len)
|
||||
return self.create_home_split();
|
||||
|
||||
if (self.views.get_at(self.active_view)) |view| view.unfocus();
|
||||
self.active_view = n;
|
||||
if (self.views.get_at(self.active_view)) |view| view.focus();
|
||||
}
|
||||
pub const focus_split_meta: Meta = .{ .description = "Focus split view", .arguments = &.{.integer} };
|
||||
|
||||
pub fn gutter_mode_next(self: *Self, _: Ctx) Result {
|
||||
const config = tui.config_mut();
|
||||
const mode: ?@import("config").LineNumberMode = if (config.gutter_line_numbers_mode) |mode| switch (mode) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue