core: fix up toggle_slide_terminal action for rebase

This commit is contained in:
Mitchell Hashimoto
2024-09-25 09:48:47 -07:00
parent bdc2c02f23
commit 7806366eec
7 changed files with 9 additions and 6 deletions

View File

@ -507,6 +507,7 @@ typedef enum {
GHOSTTY_ACTION_TOGGLE_FULLSCREEN, GHOSTTY_ACTION_TOGGLE_FULLSCREEN,
GHOSTTY_ACTION_TOGGLE_TAB_OVERVIEW, GHOSTTY_ACTION_TOGGLE_TAB_OVERVIEW,
GHOSTTY_ACTION_TOGGLE_WINDOW_DECORATIONS, GHOSTTY_ACTION_TOGGLE_WINDOW_DECORATIONS,
GHOSTTY_ACTION_TOGGLE_SLIDE_TERMINAL,
GHOSTTY_ACTION_GOTO_TAB, GHOSTTY_ACTION_GOTO_TAB,
GHOSTTY_ACTION_GOTO_SPLIT, GHOSTTY_ACTION_GOTO_SPLIT,
GHOSTTY_ACTION_RESIZE_SPLIT, GHOSTTY_ACTION_RESIZE_SPLIT,

View File

@ -324,6 +324,7 @@ pub fn performAction(
.open_config => try rt_app.performAction(.app, .open_config, {}), .open_config => try rt_app.performAction(.app, .open_config, {}),
.reload_config => try self.reloadConfig(rt_app), .reload_config => try self.reloadConfig(rt_app),
.close_all_windows => try rt_app.performAction(.app, .close_all_windows, {}), .close_all_windows => try rt_app.performAction(.app, .close_all_windows, {}),
.toggle_slide_terminal => try rt_app.performAction(.app, .toggle_slide_terminal, {}),
} }
} }

View File

@ -3856,12 +3856,6 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool
.toggle, .toggle,
), ),
.toggle_slide_terminal => {
if (@hasDecl(apprt.Surface, "toggleSlideTerminal")) {
self.rt_surface.toggleSlideTerminal();
} else log.warn("runtime doesn't implement toggleSlideTerminal", .{});
},
.select_all => { .select_all => {
const sel = self.io.terminal.screen.selectAll(); const sel = self.io.terminal.screen.selectAll();
if (sel) |s| { if (sel) |s| {

View File

@ -93,6 +93,9 @@ pub const Action = union(Key) {
/// Toggle whether window directions are shown. /// Toggle whether window directions are shown.
toggle_window_decorations, toggle_window_decorations,
/// Toggle the slide terminal in or out.
toggle_slide_terminal,
/// Jump to a specific tab. Must handle the scenario that the tab /// Jump to a specific tab. Must handle the scenario that the tab
/// value is invalid. /// value is invalid.
goto_tab: GotoTab, goto_tab: GotoTab,
@ -176,6 +179,7 @@ pub const Action = union(Key) {
toggle_fullscreen, toggle_fullscreen,
toggle_tab_overview, toggle_tab_overview,
toggle_window_decorations, toggle_window_decorations,
toggle_slide_terminal,
goto_tab, goto_tab,
goto_split, goto_split,
resize_split, resize_split,

View File

@ -196,6 +196,7 @@ pub const App = struct {
.close_all_windows, .close_all_windows,
.toggle_tab_overview, .toggle_tab_overview,
.toggle_window_decorations, .toggle_window_decorations,
.toggle_slide_terminal,
.goto_tab, .goto_tab,
.inspector, .inspector,
.render_inspector, .render_inspector,

View File

@ -379,6 +379,7 @@ pub fn performAction(
// Unimplemented // Unimplemented
.close_all_windows, .close_all_windows,
.toggle_split_zoom, .toggle_split_zoom,
.toggle_slide_terminal,
.size_limit, .size_limit,
.cell_size, .cell_size,
.secure_input, .secure_input,

View File

@ -578,6 +578,7 @@ pub const Action = union(enum) {
.reload_config, .reload_config,
.close_all_windows, .close_all_windows,
.quit, .quit,
.toggle_slide_terminal,
=> .app, => .app,
// These are app but can be special-cased in a surface context. // These are app but can be special-cased in a surface context.