mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
keybind: don't clobber the clipboard if the title is empty
This commit is contained in:
@ -4445,6 +4445,7 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool
|
||||
|
||||
.copy_title_to_clipboard => {
|
||||
const title = self.rt_surface.getTitle() orelse return false;
|
||||
if (title.len == 0) return false;
|
||||
|
||||
self.rt_surface.setClipboardString(title, .standard, false) catch |err| {
|
||||
log.err("error copying title to clipboard err={}", .{err});
|
||||
|
@ -282,7 +282,7 @@ pub const Action = union(enum) {
|
||||
copy_url_to_clipboard,
|
||||
|
||||
/// Copy the terminal title to the clipboard. If the terminal title is not
|
||||
/// set this has no effect.
|
||||
/// set or is empty this has no effect.
|
||||
copy_title_to_clipboard,
|
||||
|
||||
/// Increase the font size by the specified amount in points (pt).
|
||||
|
Reference in New Issue
Block a user