-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix copy_on_select GTK toast spam #5010
base: main
Are you sure you want to change the base?
Conversation
I think adding a delay is unnecessary since the toast spam is fixed in a better way. |
Latest commit fixes memory leak and removes log line. |
a7ec94e
to
5934bd5
Compare
5934bd5
to
873d5b8
Compare
The issue I have with this PR is that it makes it so that non-mouse selection (i.e. selection keybinds) do not update the selection clipboard. I'm not sure if that's intended behavior (I haven't checked other terminals that support it), but the way I currently expect selection to work is that any selection method would result in the selection keyboard being updated. I think an alternate approach is needed here where maybe |
Ah I see. I'll take another look. |
Fixes core issue for #4800, moves copy_on_select clipboard logic in
src/Surface.zig
out ofsetSelection
and intohandleMouseButton
. When left mouse is released and the current selection is not empty, saves selection to clipboard and sends an adw toast. The selection will still be updated as the user drags, however the clipboard will be written to just once when the mouse button is released.This patch doesn't add a delay to sending the toast as suggested, wasn't sure how to best do that without throwing it in an async function. Open to suggestions. :)