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

osc52 support should use the TTY of the TUI client, not the backend #28792

Open
j-xella opened this issue May 16, 2024 · 0 comments
Open

osc52 support should use the TTY of the TUI client, not the backend #28792

j-xella opened this issue May 16, 2024 · 0 comments
Labels
bug issues reporting wrong behavior clipboard clipboard, paste remote remote UI, --remote commands, p2p / peer-to-peer tui
Milestone

Comments

@j-xella
Copy link

j-xella commented May 16, 2024

Problem

It seems to me that the osc52 copying is run completely on the back-end side. This does not really matter for quick nvim sessions, when both back and TUI parts are running in the same shell. But in cases when the back-end is treated as a server (in my case to preserve my session during disconnects) it could lead to copying via osc52 being broken.

I believe osc52 functionality should be invoked in the terminal TUI is running in.:

  • Either the logic should be invoked in TUI part of nvim
  • Or the back-end should have access to the terminal of the TUI and use it

Steps to reproduce

You need 2 terminals, one with (T1) and the other without (T2) osc-52 support.

In T1, if you just run nvim, and from there

:=require('vim.ui.clipboard.osc52').copy('+')({'test1'})

The text test1 should appear on the clipboard.

Now, start the neovim backend in T2 :

nvim --headless --listen xxxxx

And connect to it from T1 :

nvim --server `fd xxxxx /tmp/nvim.$(id -nu)` --remote-ui

If you try putting something on the clipboard now using the require command above, it does not work any more.

Expected behavior

Because we are working in T1 which supports osc-52 , copying should work.

Neovim version (nvim -v)

NVIM v0.10.0-dev-2658+g0f85aeb47

Vim (not Nvim) behaves the same?

not applicable

Operating system/version

Linux RHEL 7.9

Terminal name/version

wezterm as T1, xterm as T2

$TERM environment variable

wezterm and xterm respectively

Installation

build from repo

@j-xella j-xella added the bug issues reporting wrong behavior label May 16, 2024
@zeertzjq zeertzjq added clipboard clipboard, paste tui labels May 16, 2024
@justinmk justinmk added the remote remote UI, --remote commands, p2p / peer-to-peer label May 17, 2024
@justinmk justinmk added this to the 0.11 milestone May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior clipboard clipboard, paste remote remote UI, --remote commands, p2p / peer-to-peer tui
Projects
None yet
Development

No branches or pull requests

3 participants