-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Tmux copy-mode copied text loss #1002
Comments
Curiously I use the same setup and I cannot reproduce your issue. Arch Linux, X11, tmux 2.6, alacritty b600e40 |
Maybe it's my tmux is too old? I'm using tmux 2.3, and alacritty is built from master. update : when upgrade to tmux 2.6, the issue was gone. It works as expected. I didnot use any |
Im loosing lines as well, but only with tmux 2.6, alacritty b600e40 |
Can you give me your |
.tmux.conf
So its probably |
It happens without |
All right, it took me a while but I managed to reproduce at least something! Here's what I've got:
In summary, I reproduce the issue with the default behavior of Alternative to unbinding And now it all makes sense, because Let's kindly invite @geertj to the thread. TL;DR: |
@maximbaz, I've not used Since tmux-yank and set-clipboard do essentially the same thing, I think you'd have to use one or the other. If you disable tmux-yank and enable set-clipboard, do you still see partial data on the clipboard? If so, could you add a |
Something weird happened, I can't get |
Mystery solved, apparently Anyway, now I can answer your question @geertj. OSC 52 handler is called only once per selection, and the parameters are So I'm not sure what to blame exactly, since Click to see one exampleHere's the arguments for
If I convert this manually to a string and then try to decode the string, I'll get the following:
|
According to the tmux manual entry for
It sounds like if we support OSC 52, we need to state as much in our terminfo file. |
Here's xterm's entry: |
I thought that this line literally means "whatever xterm defines, I have that too": However even manually adding By the way, this has also been reported to tmux, closed with "use |
Ah yeah, we actually have an OSC length limit from the vte state machine. |
vte could potentially fall-back to storing OSC data in a |
This patch is a workaround for issues like alacritty/alacritty#1002 .
To add extra info to this issue, I've had literally the exact same issue with tmux, except I can completely eliminate alacritty from the equation; the issue happens in urxvt too. And the solution is the same: putting HUGE thanks to @maximbaz; I've been pulling my hair out over this for the last few days. |
Whilst playing around with vte and processing iTerm2's image protocol, I ran into the relatively small statically sized OSC buffer. This diff switches the buffer from a static array to use a `Vec<u8>`. I did briefly experiment with just making this buffer much larger (as alacritty#15 does), but even at 1MB (which is too small for images) that size can lead to a stack overflow during initialization. In order to preserve building in a `no_std` environment this is done conditionally. I've followed the pattern used in other crates with similar requirements: * Introduced a `std` feature to signal that `std` is ok * The `std` feature is on by default * `no_std` crates that consume this one will need to set `vte` to `default-features = false` in their deps * I've bumped the version in order to avoid breaking `no_std` consumers Test Plan: ``` $ cargo test --no-default-features $ cargo test ``` Refs: alacritty/alacritty#1002
This change includes dynamic escape buffer support in VTE, which allows us to have arbitrary escape sizes. Since tmux could potentially use very long escapes for the clipboard escape, this allows copying more text. Fixes alacritty#1002.
This change includes dynamic escape buffer support in VTE, which allows us to have arbitrary escape sizes. Since tmux could potentially use very long escapes for the clipboard escape, this allows copying more text. Fixes #1002.
**Why** is the change needed? It is very important to quickly be able to copy output from given commands. **How** is the need addressed? 1. Don't copy on selection in alacritty 2. Use xclip on copy in tmux 3. Search forward instead of backwards to the last prompt (tmux) 4. Add helpful bindings 5. Don't set the clipboard on selection (alacritty/alacritty#1002) Closes #73
**Why** is the change needed? It is very important to quickly be able to copy output from given commands. **How** is the need addressed? 1. Don't copy on selection in alacritty 2. Use xclip on copy in tmux 3. Search forward instead of backwards to the last prompt (tmux) 4. Add helpful bindings 5. Don't set the clipboard on selection (alacritty/alacritty#1002) Closes #73
This change includes dynamic escape buffer support in VTE, which allows us to have arbitrary escape sizes. Since tmux could potentially use very long escapes for the clipboard escape, this allows copying more text. Fixes alacritty#1002.
**Why** is the change needed? It is very important to quickly be able to copy output from given commands. **How** is the need addressed? 1. Don't copy on selection in alacritty 2. Use xclip on copy in tmux 3. Search forward instead of backwards to the last prompt (tmux) 4. Add helpful bindings 5. Don't set the clipboard on selection (alacritty/alacritty#1002) Closes #73
Which operating system does the issue occur on?
elementary OS
If on linux, are you using X11 or Wayland?
X11.
I use tmux and tmux-plugins/tmux-yank to copy text to system clipboard (through copy-mode y command). When I copied, say 30 lines, and CTRL-V paste them to sublime, there are only 10 lines pasted, the other lines are lost.
copied
pasted
Tested with system terminal, It works fine.
The text was updated successfully, but these errors were encountered: