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

tig incorrectly calculates width of strings with multibyte charactes with wrap-lines = yes #988

Closed
Self-Perfection opened this issue Jan 25, 2020 · 1 comment
Assignees

Comments

@Self-Perfection
Copy link

Self-Perfection commented Jan 25, 2020

Version, environment: tig 2.5.0, Arch linux

Here is an example text:

tig incorrectly counts width of lines with multibyte characters. Let's take a look at example:
Как пуст, и вял, и ничтожен почти всякий прожитой день! Как мало следов оставляет он за собою! Как бессмысленно глупо пробежали эти часы за часами!

And it looks like this
Screenshot_20200126_001733

Note that each cyrillic character is represented by 2 bytes in UTF-8. Apparently tig wraps lines to width X adding line breaks every X bytes instead actual characters. Also note portion of text in between is not visible. It seems previous line was cut in the middle of character, invisible line starts with last byte of character from previous line and it breaks its parsing.

@koutcher koutcher self-assigned this Apr 10, 2020
@Self-Perfection
Copy link
Author

Cool!
@koutcher It was funny and flattering to see that you not just used my example in test/blob/wrap-lines-test but also mentioned its actual author! 😄

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