-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Middle click paste and primary clipboard #532
Comments
Can't speak for @archseer, but I'm fine with it as long as it can be disabled in config. I personally find both behaviors really annoying, and really wish I could disable them in all of my Linux applications (especially terminal emulators...). But I understand why some people like it, and it matches the behavior of many terminal emulators, so it seems worth supporting as an option. |
I think this used to work before #509 which enabled mouse events. The terminal automatically handled it, but it looks like we might need to do it manually now. |
Exactly. There were some problems though as terminal simply types on the keyboard and so closing brackets were often duplicated. |
Oh, I'm specifically talking about copy on select. The clipboard is already supported via Pasting via ctrl+v/middle click needs to use the bracketed paste mode which isn't supported yet in crossterm (crossterm-rs/crossterm#557), but it's supported in termwiz which I've been evaluating as a possible replacement. |
Copy on select is done to the primary selection, not the clipboard. The feature is for convenience of some users (like me e.g.) who like having 2 copy-paste buffers. Why is that a requirement, can't we just run our typical functions as with |
|
Yeah, so this worked for me and copied to the middle click clipboard when mouse events were off because dragging with the mouse made a real terminal selection. We're handling events manually now so this also has to be implemented inside helix now. |
This seems to be required when mouse events are disabled and terminal 'types' for us. Middle click paste built into Helix should work fine by executing internal commands. |
Describe your feature request
Copy-on-select + middle click paste is a quite common feature on Linux, browsers and toolkits like GTK implement it. This is pretty convenient to use, should work great with mouse selection as well. It should be available as an option on any system with no-op backend (copy-paste inside the editor), but can be backed by supporting clipboard provider implementation.
This is supported at least by
wl-copy
/wl-paste
with-p
on Wayland.xsel
should also be able to do this when run without-b
. New options will be added to Helix's clipboard support to work with primary selection as well. Also if no provider is available with primary selection capabilities, those functions will work, backed by in-memory string without system integration, so it will only be available inside the Helix editor.I can work on adding this feature after it is considered good to go.
The text was updated successfully, but these errors were encountered: