helix
helix copied to clipboard
Failure to Copy to System Clipboard in tmux in Specific Directory
Summary
While operating in the $HOME/dev directory (including its subdirectories) and using the yank command Space + y to copy text to the system clipboard, the operation fails to execute as expected. However, when I navigate up to the $HOME directory, the same operation functions as expected.
This issue seems to be specifically tied to operating in an SSH session from a Mac into a PC. Using a terminal directly from the PC does not reproduce the issue; all clipboard functions work correctly in that scenario.
Reproduction Steps
Steps to Reproduce:
- SSH into the PC from a Mac.
- Launch tmux and navigate to
$HOME/devdirectory (or any subdirectory). - Attempt to yank text to system clipboard using
Space + y.
Expected Behavior:
The yanked text should be copied to the system clipboard, regardless of the current directory.
Actual Behavior:
No visible error upon pressing the keyboard shortcut, but an error message appears when running the :clipboard-yank command:
Couldn't set the system clipboard content: clipboard provider tmux failed
Helix log
~/.cache/helix/helix.log
2023-06-04T13:01:47.888 helix_view::editor [ERROR] editor error: Couldn't set system clipboard content: clipboard provider tmux failed
Platform
Linux & macOS
Terminal Emulator
Alacritty on Mac
Helix Version
helix 22.12
Same issue for me however seems to be present in any directory. My setup looks like WSL2 -> SSH -> Tmux -> Helix. Clipboard works fine from Tmux but not within Helix.
same issue, helix system clipboard(Space + y) is not working inside tmux.
Platform macOS
Terminal Emulator iterm2
Helix Version 23.05(built from master branch)
Having this issue, but it's very erratic, sometimes it works, sometimes it doesn't.
Similar issue, Space + p does not work.
To fix Space + y not working, I did the following:
In iterm2, enabling Applications in terminal may access clipboard in General > Selection source
As a crude fix for the clipboard paste I set the following keymaps:
[keys.normal.space]
P = ":insert-output tmux send-keys i; pbpaste; tmux send-keys Escape"
p = ":insert-output tmux send-keys a; pbpaste; tmux send-keys Escape"