feat: close results pane if find_in_files mode is cancelled
This commit is contained in:
parent
3e8faabd9d
commit
b410687339
3 changed files with 8 additions and 1 deletions
|
@ -387,7 +387,7 @@
|
|||
["f15", "goto_prev_match"],
|
||||
["f9", "theme_prev"],
|
||||
["f10", "theme_next"],
|
||||
["escape", "exit_mini_mode"],
|
||||
["escape", "mini_mode_cancel"],
|
||||
["enter", "mini_mode_select"],
|
||||
["backspace", "mini_mode_delete_backwards"]
|
||||
]
|
||||
|
|
|
@ -597,6 +597,12 @@ const cmds = struct {
|
|||
}
|
||||
pub const show_inspector_view_meta: Meta = .{};
|
||||
|
||||
pub fn close_find_in_files_results(self: *Self, _: Ctx) Result {
|
||||
if (self.file_list_type == .find_in_files and self.is_panel_view_showing(filelist_view))
|
||||
try self.toggle_panel_view(filelist_view, false);
|
||||
}
|
||||
pub const close_find_in_files_results_meta: Meta = .{ .description = "Close find in files results view" };
|
||||
|
||||
pub fn jump_back(self: *Self, _: Ctx) Result {
|
||||
try self.location_history_.back(location_jump);
|
||||
}
|
||||
|
|
|
@ -100,6 +100,7 @@ const cmds = struct {
|
|||
pub const mini_mode_reset_meta: Meta = .{ .description = "Clear input" };
|
||||
|
||||
pub fn mini_mode_cancel(_: *Self, _: Ctx) Result {
|
||||
command.executeName("close_find_in_files_results", .{}) catch {};
|
||||
command.executeName("exit_mini_mode", .{}) catch {};
|
||||
}
|
||||
pub const mini_mode_cancel_meta: Meta = .{ .description = "Cancel input" };
|
||||
|
|
Loading…
Add table
Reference in a new issue