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

Tab characters are not output, at least for copying #219

Closed
colindean opened this issue Jan 8, 2017 · 7 comments
Closed

Tab characters are not output, at least for copying #219

colindean opened this issue Jan 8, 2017 · 7 comments

Comments

@colindean
Copy link

I tweeted about display time, praising Alacritty for being faster to display than iTerm2. Way to go!

But in the process, identified a bug: tab characters are copied as spaces. See the tweet linked above and its replies for the thoughts.

I reproduced it more simply here:

# iterm2
$ echo -e "[\t\t\t\t]"
[				]

#alacritty
$ echo -e "[\t\t\t\t]"
[       ]

I retrieved the above output by highlighting from the $ to the ] as displayed by each terminal emulator. iTerm2 is allowing the copy of 4 tab characters. Alacritty is outputting 7 spaces?

I'm using Alacrity at 61389c1 on macOS 10.11 using what is the default settings, but with font changed to Menlo and the Solarized theme uncommented.

#106 could be related because it demonstrates some tab weirdness.

@jwilm jwilm added the B - bug label Jan 8, 2017
sblundy added a commit to sblundy/alacritty that referenced this issue Jan 3, 2018
Adding tab characters to the Grid as an actual tab - rather than a space - followed by spacer characters. The spacer characters have the WIDE_CHAR_SPACER flag so the selection code will *not* pass them to the clipboard
@tinywombat765
Copy link

This is working for me on Arch Linux running the AUR package version 0.1.0.569.g4e9b1c5-1

@colindean
Copy link
Author

Still not working for me as of 59b561b.

I check this by executing

echo -e "tab\ttab"

in iTerm2 and Alacritty, and then copypasting the output after echo and appending | wc -c.

echo "tab     tab" | wc -c

If tab is spaces, then it'll be 12. If it's a tab, it'll be 8.

@nixpulvis
Copy link
Contributor

nixpulvis commented Jul 2, 2018

Hmmm, interesting. I believe I can reproduce this as well. FWIW, I found piping things into xxd to be a bit more insightful.

chrisduerr pushed a commit to chrisduerr/alacritty that referenced this issue Jul 16, 2018
Adding tab characters to the Grid as an actual tab - rather than a space - followed by spacer characters. The spacer characters have the WIDE_CHAR_SPACER flag so the selection code will *not* pass them to the clipboard
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Dec 15, 2018
This resolves issues with copy-pasting tabs by including them in the
pasted string.

Selection of tabs is still inconsistent with what might be expected
based on other terminal emulators, however the behavior hasn't
regressed.

This fixes alacritty#219.
@Rizhiy
Copy link

Rizhiy commented Jan 15, 2023

@chrisduerr There appears to be a regression on this.
Just tested with Ubuntu 20.04.
Alacritty installed from cargo: alacritty 0.11.0

@chrisduerr
Copy link
Member

I can copy tabs just fine. Make sure you're not running tmux or anything else sitting in-between PTY and Alacritty.

@Rizhiy
Copy link

Rizhiy commented Jan 15, 2023

Hmm, indeed. I'm running tmux, any idea how I can make it work?

@chrisduerr
Copy link
Member

That's up to tmux really, which I do not use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants