-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improve clipboard yanking messages #2615
Comments
Does this only happen when using the mouse? Does Spacey work to copy a selection to the system clipboard? |
This happens both with mouse and Space y. I found the culprit in the meanwhile: In I see several ways to improve the current situation:
|
Yeah improving that error message would be great. I think I would prefer that the system clipboard commands fail when the contents can't be copied so it's more noticeable. What do others think? |
Agreed! |
Interestingly, selecting with the mouse doesn't work on Windows while Space + y works just fine. |
Selecting with the mouse copies text to the secondary clipboard in Linux, which doesn't exist in Windows. We could copy to the clipboard for windows in this case, but that would probably be too disruptive - the secondary clipboard in Linux doesn't override the contents of a normal ctrl+c made in some other application, while in Windows (due to a lack of multiple clipboards) it will. |
The distinction between mouse select and y isn't very clear:
It is not clear from this prompt that one of them goes to the middle click clipboard yet the other one goes to the normal (Ctrl+C/V) clipboard. Does anyone know what's the correct term for not only X (which I know are clipboard and primary) but also Wayland? (Maybe we just call them "system clipboard" and "system selection clipboard"? Also, the |
Copying to system clipboard via space+y does not work on Windows through WSL. |
@the-mikedavis thank you VERY much for the referral! |
cross-posting here: I've started working on this, learning Rust as I go 😅 |
I'm using |
Running on RHEL 8 here, and space + y yanks to system clipboard, but the mouse select does not. I've just looked at other issues, and now realize that the mouse selection clipboard is the middle-mouse click clipboard, while space + y is the ctrl+c/v clipboard. Also, I now see someone else said the same thing further up facepalm |
Hi i am trying to use space + Y to be able to copy text from helix to main clipboard but it doesn't, try to paste the text outside helix but it doesn't work. $ hx --health Config file: default |
Faced the same problem. I had no idea why copy paste to system clipboard wasn't working, when it clearly showed a success message. I thought it was just a helix bug. Technically it is tho. Thanks to @01mf02 for providing a workaround with xclip. (I'm running ubuntu) |
Okay, this is something I've encountered as well, and it works after install xclip. I've also tried this with wl-clipboard, and it works fine. |
When I select the entire document with % and then try to yank to system clipboard, helix freezes. |
@nexovec Install xclip if you're on x11, or wl-clipboard if you're on wayland. |
Yeah we now have the OSC52 provider as a fallback and the message was adjusted slightly to say which clipboard you're yanking to in #4275. We also bubble up errors from the clipboard providers so if one fails (non-zero exit code) that should show in the UI. Configuration for clipboard provider is covered by #8826 and I think the other comments in this thread have been about debugging environments (i.e. needing to install the right clipboard tool) so I will close this out. |
Summary
When selecting some text with the mouse, the message "yanked main selection to system clipboard" appears at the bottom, yet the clipboard does not seem to contain the selected text.
Reproduction Steps
I tried this:
hx
I expected this to happen:
The text "Hello" should appear in the GTK application.
Instead, this happened:
Some previously selected text appears in the GTK application.
Helix log
Nothing interesting here.
Platform
Linux
Terminal Emulator
xfce4-terminal 0.8.10
Helix Version
22.05-10-g370a16d0
The text was updated successfully, but these errors were encountered: