-
Notifications
You must be signed in to change notification settings - Fork 622
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
Compiling with ncurses instead of ncursesw breaks alignment/repaint #1240
Comments
Later versions of ncurses (20111030 and up) support NCURSES_WIDECHAR even when compiling with libncurses instead of libncursesw. Have tig correctly report whether it was linked against libncursesw or libncurses based off the same defines we set in the build script and use to determine which headers to include. (See jonas#1240 as an example of where `tig --version` incorrectly reports `ncursesw` instead of `ncurses`).
@mqudsi No idea what's the cause of this issue but it's nice that you're also using Tig :) |
Hey, hey @krobelus. Nice to bump into you here too - I had to double-check I had the right repository when I ran I use tig to see relationships between branches and - most importantly - to navigate backwards in WRT to the behavior described in this bug: it's old and goes back to 2018. Not sure if bisecting will help, but if I have some time I can give that a try. |
Later versions of ncurses (20111030 and up) support NCURSES_WIDECHAR even when compiling with libncurses instead of libncursesw. Have tig correctly report whether it was linked against libncursesw or libncurses based off the same defines we set in the build script and use to determine which headers to include. Per the build system, either of HAVE_NCURSESW_H or HAVE_NCURSESW_CURSES_H may indicate the presence of ncursesw, so both are checked. (See jonas#1240 as an example of where `tig --version` incorrectly reports `ncursesw` instead of `ncurses`).
Later versions of ncurses (20111030 and up) support NCURSES_WIDECHAR even when compiling with libncurses instead of libncursesw. Have tig correctly report whether it was linked against libncursesw or libncurses based off the same defines we set in the build script and use to determine which headers to include. Per the build system, either of HAVE_NCURSESW_H or HAVE_NCURSESW_CURSES_H may indicate the presence of ncursesw, so both are checked. (See #1240 as an example of where `tig --version` incorrectly reports `ncursesw` instead of `ncurses`).
@koutcher is there a commit that fixes this? |
@mqudsi, sorry I was mistaken by your PR being merged. Note that if the problem happens only with some terminals the problem is unlikely to be in Tig, it rather be in the terminfo description for this terminal. You can try to add a private terminfo entry in ~/.terminfo using |
Compiling tig (from
master
) withlibncurses-dev
but nolibncursesw5-dev
installed causes tig to experience some alignment issues and repaint problems that do not happen withlibncursesw5-dev
installed/used instead.Here's how it looks with the following configuration:
giving
tig.mp4
And here's how it looks compiled with
libncursesw5-dev
correctly installed instead:tig2.mp4
Behavior observed under both Kitty and conhost (Windows cmd). Behavior not reproducible in some other terminal emulators.
I don't think UTF-8 is a factor, at least it shouldn't be as I don't think I see any non-ASCII characters in the output on screen at a glance. If tig is using Unicode/non-ASCII symbols for display/formatting, then it shouldn't if no libncursesw was detected (in which case wide character support would only be used for git messages or file contents containing Unicode characters).
The text was updated successfully, but these errors were encountered: