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 highlight when there are zero-width characters in string #252

Closed
Aloxaf opened this issue Jan 16, 2020 · 0 comments
Closed

Wrong highlight when there are zero-width characters in string #252

Aloxaf opened this issue Jan 16, 2020 · 0 comments

Comments

@Aloxaf
Copy link

Aloxaf commented Jan 16, 2020

How to reproduce

Run following code in zsh, and type 'abcghi'

echo $'abc\bdef\bghi' | sk --reverse --height=10 --color='hl+:#ff0000'
# \b can be replace to \1 or \2

Result

图片

Expected

图片

@Aloxaf Aloxaf changed the title Wrong highlight with '\b' Wrong highlight when there are zero-width characters in string Jan 16, 2020
lotabout added a commit that referenced this issue Jan 27, 2020
makovich pushed a commit to makovich/skim that referenced this issue May 28, 2020
Though I'd recommend not using these tricky characters at all, here is
how it is handled in skim:

1. with `--ansi`, '\b' will delete the previous character
2. without `--ansi`, '\b' will be ignored at renderinga
    - note that the '\b' character still exists for matching
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

1 participant