From 547bcd261dcbd25bfab99d3fb00c2f93af994605 Mon Sep 17 00:00:00 2001 From: Matthew Hrehirchuk Date: Tue, 21 Oct 2025 09:57:14 -0600 Subject: [PATCH] fix: removed apprt action for toggle_readonly --- include/ghostty.h | 1 - src/Surface.zig | 6 +----- src/apprt/action.zig | 6 ------ src/apprt/gtk/class/application.zig | 4 ---- 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/include/ghostty.h b/include/ghostty.h index cd716e38f..702a88ecc 100644 --- a/include/ghostty.h +++ b/include/ghostty.h @@ -797,7 +797,6 @@ typedef enum { GHOSTTY_ACTION_RESIZE_SPLIT, GHOSTTY_ACTION_EQUALIZE_SPLITS, GHOSTTY_ACTION_TOGGLE_SPLIT_ZOOM, - GHOSTTY_ACTION_TOGGLE_READONLY, GHOSTTY_ACTION_PRESENT_TERMINAL, GHOSTTY_ACTION_SIZE_LIMIT, GHOSTTY_ACTION_RESET_WINDOW_SIZE, diff --git a/src/Surface.zig b/src/Surface.zig index 951ef14ef..7bfdad665 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -5405,11 +5405,7 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool .toggle_readonly => { self.readonly = !self.readonly; - return try self.rt_app.performAction( - .{ .surface = self }, - .toggle_readonly, - {}, - ); + return true; }, .reset_window_size => return try self.rt_app.performAction( diff --git a/src/apprt/action.zig b/src/apprt/action.zig index 83e2f5011..94965d38c 100644 --- a/src/apprt/action.zig +++ b/src/apprt/action.zig @@ -139,11 +139,6 @@ pub const Action = union(Key) { /// to take up the entire window. toggle_split_zoom, - /// Toggle whether the surface is in read-only mode. When read-only, - /// no input is sent to the PTY but terminal-level operations like - /// selections, scrolling, and copy/paste keybinds still work. - toggle_readonly, - /// Present the target terminal whether its a tab, split, or window. present_terminal, @@ -340,7 +335,6 @@ pub const Action = union(Key) { resize_split, equalize_splits, toggle_split_zoom, - toggle_readonly, present_terminal, size_limit, reset_window_size, diff --git a/src/apprt/gtk/class/application.zig b/src/apprt/gtk/class/application.zig index bbf408e02..47c2972ac 100644 --- a/src/apprt/gtk/class/application.zig +++ b/src/apprt/gtk/class/application.zig @@ -724,10 +724,6 @@ pub const Application = extern struct { .toggle_window_decorations => return Action.toggleWindowDecorations(target), .toggle_command_palette => return Action.toggleCommandPalette(target), .toggle_split_zoom => return Action.toggleSplitZoom(target), - .toggle_readonly => { - // The readonly state is managed in Surface.zig. - return true; - }, .show_on_screen_keyboard => return Action.showOnScreenKeyboard(target), .command_finished => return Action.commandFinished(target, value),