diff --git a/include/ghostty.h b/include/ghostty.h index 735b1d467..b32cc9856 100644 --- a/include/ghostty.h +++ b/include/ghostty.h @@ -904,7 +904,7 @@ typedef enum { GHOSTTY_ACTION_SEARCH_TOTAL, GHOSTTY_ACTION_SEARCH_SELECTED, GHOSTTY_ACTION_READONLY, - GHOSTTY_ACTION_COPY_TITLE, + GHOSTTY_ACTION_COPY_TITLE_TO_CLIPBOARD, } ghostty_action_tag_e; typedef union { diff --git a/macos/Sources/Ghostty/Ghostty.App.swift b/macos/Sources/Ghostty/Ghostty.App.swift index 7d593d6df..e3441257f 100644 --- a/macos/Sources/Ghostty/Ghostty.App.swift +++ b/macos/Sources/Ghostty/Ghostty.App.swift @@ -647,8 +647,8 @@ extension Ghostty { case GHOSTTY_ACTION_SHOW_CHILD_EXITED: Ghostty.logger.info("known but unimplemented action action=\(action.tag.rawValue)") return false - case GHOSTTY_ACTION_COPY_TITLE: - return copyTitle(app, target: target) + case GHOSTTY_ACTION_COPY_TITLE_TO_CLIPBOARD: + return copyTitleToClipboard(app, target: target) default: Ghostty.logger.warning("unknown action action=\(action.tag.rawValue)") return false @@ -1508,7 +1508,7 @@ extension Ghostty { } } - private static func copyTitle( + private static func copyTitleToClipboard( _ app: ghostty_app_t, target: ghostty_target_s) -> Bool { switch (target.tag) { diff --git a/src/Surface.zig b/src/Surface.zig index 9a4a8c3b0..88cb21af0 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -5400,7 +5400,7 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool .copy_title_to_clipboard => return try self.rt_app.performAction( .{ .surface = self }, - .copy_title, + .copy_title_to_clipboard, {}, ), diff --git a/src/apprt/action.zig b/src/apprt/action.zig index 766ad7bf7..1d9ef633c 100644 --- a/src/apprt/action.zig +++ b/src/apprt/action.zig @@ -333,7 +333,7 @@ pub const Action = union(Key) { /// Copy the effective title of the surface to the clipboard. /// The effective title is the user-overridden title if set, /// otherwise the terminal-set title. - copy_title, + copy_title_to_clipboard, /// Sync with: ghostty_action_tag_e pub const Key = enum(c_int) { @@ -400,7 +400,7 @@ pub const Action = union(Key) { search_total, search_selected, readonly, - copy_title, + copy_title_to_clipboard, }; /// Sync with: ghostty_action_u diff --git a/src/apprt/gtk/class/application.zig b/src/apprt/gtk/class/application.zig index e362e7f00..b27347bc0 100644 --- a/src/apprt/gtk/class/application.zig +++ b/src/apprt/gtk/class/application.zig @@ -649,7 +649,7 @@ pub const Application = extern struct { .close_tab => return Action.closeTab(target, value), .close_window => return Action.closeWindow(target), - .copy_title => return Action.copyTitle(target), + .copy_title_to_clipboard => return Action.copyTitleToClipboard(target), .config_change => try Action.configChange( self, @@ -1898,7 +1898,7 @@ const Action = struct { } } - pub fn copyTitle(target: apprt.Target) bool { + pub fn copyTitleToClipboard(target: apprt.Target) bool { return switch (target) { .app => false, .surface => |v| surface: {