mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00
gtk: only show clipboard toast when content isn't empty
This commit is contained in:
@ -1259,9 +1259,13 @@ pub fn setClipboardString(
|
|||||||
// We only toast if we are copying to the standard clipboard.
|
// We only toast if we are copying to the standard clipboard.
|
||||||
if (clipboard_type == .standard and
|
if (clipboard_type == .standard and
|
||||||
self.app.config.@"app-notifications".@"clipboard-copy")
|
self.app.config.@"app-notifications".@"clipboard-copy")
|
||||||
{
|
toast: {
|
||||||
if (self.container.window()) |window|
|
const window = self.container.window() orelse break :toast;
|
||||||
window.sendToast(i18n._("Copied to clipboard"));
|
|
||||||
|
if (val.len > 0)
|
||||||
|
window.sendToast(i18n._("Copied to clipboard"))
|
||||||
|
else
|
||||||
|
window.sendToast(i18n._("Cleared clipboard"));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user