rename copy_title action to copy_title_to_clipboard

This commit is contained in:
Priyanshu
2026-02-13 09:59:02 +05:30
parent b4be13ed50
commit de49b7f27b
5 changed files with 9 additions and 9 deletions

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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,
{},
),

View File

@@ -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

View File

@@ -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: {