From 1d28985568e18a2da7a716fb8875e8da84fc5266 Mon Sep 17 00:00:00 2001 From: n0n Date: Tue, 4 Nov 2025 11:22:20 +0200 Subject: [PATCH 1/2] feat: reopen closed tab --- src/tui/mainview.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tui/mainview.zig b/src/tui/mainview.zig index 3c83c17..91aef48 100644 --- a/src/tui/mainview.zig +++ b/src/tui/mainview.zig @@ -1012,6 +1012,11 @@ const cmds = struct { } pub const open_most_recent_file_meta: Meta = .{ .description = "Open the last changed file" }; + pub fn restore_closed_tab(self: *Self, _: Ctx) Result { + self.show_file_async(self.get_next_mru_buffer(.hidden) orelse return error.Stop); + } + pub const restore_closed_tab_meta: Meta = .{ .description = "Restore last closed tab" }; + pub fn system_paste(self: *Self, _: Ctx) Result { if (builtin.os.tag == .windows) { const text = try @import("renderer").request_windows_clipboard(self.allocator); From 19f88a8349f1d95f8d1c2076b85f3a819da7cbcf Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 4 Nov 2025 12:32:51 +0100 Subject: [PATCH 2/2] feat: bind restore_closed_tab to ctrl+shift+t --- src/keybind/builtin/flow.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/keybind/builtin/flow.json b/src/keybind/builtin/flow.json index adf558e..2480b15 100644 --- a/src/keybind/builtin/flow.json +++ b/src/keybind/builtin/flow.json @@ -12,6 +12,7 @@ ["ctrl+o", "open_file"], ["ctrl+e", "open_recent"], ["alt+o", "open_previous_file"], + ["ctrl+shift+t", "restore_closed_tab"], ["ctrl+shift+f5", "reload_file"], ["ctrl+k ctrl+t", "change_theme"], ["ctrl+shift+p", "open_command_palette"],