Open cor opened 1 year ago
Which clipboard provider are you using? hx --health | head
should have a line that says which one
Which clipboard provider are you using?
hx --health | head
should have a line that says which one
@the-mikedavis :
Clipboard provider: xclip
System clipboard provider: xclip
I noticed something interesting, it specifically seems to happen when I first copy something on my host OS (macOS) and then try to past it within my VM (NixOS) where Helix is running. Perhaps the shared clipboard mechanism of my hypervisor (Parallels) may have something to do with it
We can probably not fix every issue with system clipboard providers. I also run into some freezes when I press middle mouse by accident. I tracked these down to just helix waiting on the clipbaord provider forever.
I will double.check the code again to ensure there are no missed deadlocks but I skvut that. I think we should just await the clipboard providers command with a timeout to avoid locking up the editor in case the command acts up (copy should actually always run in the background). I think this is something we may want do in general for all commands: Make sure that whenever we are shelling out that we are never blocking the UI thread without a timeout.
Summary
When your system clipboard is empty and you try to paste using
<space>P
while the system clipboard is empty helix freezes forever.Reproduction Steps
I tried this:
hx
<space>p
I expected this to happen: Helix does not freeze
Instead, this happened: Helix freezes
Helix log
Platform
Linux
Terminal Emulator
/nix/store/8zfffsihd8nqmi1786k6a6n2lx5ndkw2-kitty-0.26.2/bin/kitty
Helix Version
6ab8591715daf932d0dc45d0d5fb9e5a272f2fe1