Skip to content
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

Failure to Copy to System Clipboard in tmux in Specific Directory #7224

Open
tqwewe opened this issue Jun 4, 2023 · 4 comments
Open

Failure to Copy to System Clipboard in tmux in Specific Directory #7224

tqwewe opened this issue Jun 4, 2023 · 4 comments
Labels
C-bug Category: This is a bug S-waiting-on-review Status: Awaiting review from a maintainer.

Comments

@tqwewe
Copy link

tqwewe commented Jun 4, 2023

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:

  1. SSH into the PC from a Mac.
  2. Launch tmux and navigate to $HOME/dev directory (or any subdirectory).
  3. 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

@tqwewe tqwewe added the C-bug Category: This is a bug label Jun 4, 2023
@kirawi kirawi added the S-waiting-on-review Status: Awaiting review from a maintainer. label Jun 5, 2023
@Jackojc
Copy link

Jackojc commented Jul 31, 2023

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.

@logan272
Copy link

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)

@adriangalilea
Copy link

Having this issue, but it's very erratic, sometimes it works, sometimes it doesn't.

@JosiahBLB
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

No branches or pull requests

6 participants