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

Wrong marker highlight for tabs and emojis #2534

Closed
trygveaa opened this issue Apr 12, 2020 · 2 comments
Closed

Wrong marker highlight for tabs and emojis #2534

trygveaa opened this issue Apr 12, 2020 · 2 comments

Comments

@trygveaa
Copy link
Sponsor Contributor

The marker feature treats tabs as one character wide, so if the terminal text contains tabs, the highlight will be offset from the matched text. Can be reproduced by creating the marker text 1 test and running echo -e '\ttest', which will look like this:

image

Or if you match a tab, only one character will be highlighted. Can be reproduced by creating a marker that matches \t and running echo -e '\ttest', which will look like this:

image

Another issue is that if you match an emoji that is two characters wide, only the left of the characters will be highlighted. Can be reproduced by creating the marker text 1 😂 and running echo '😂test', which will look like this:

image

And if you match a character printed directly after an emoji, the highlight will include the right character in the emoji. Can be reproduced by creating the marker text 1 t and running echo '😂test', which will look like this:

image

@kovidgoyal
Copy link
Owner

Yeah this is one the tabled for a rainy day type issues that I did not
have time to work on when implementing the feature. Since someone
noticed it, I will move it up my todo stack.

@trygveaa
Copy link
Sponsor Contributor Author

Thanks!

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

No branches or pull requests

2 participants