Skip to content

Commit

Permalink
Correctly report which version of libncurses was linked
Browse files Browse the repository at this point in the history
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 #1240 as an example of where `tig --version` incorrectly reports `ncursesw`
instead of `ncurses`).
  • Loading branch information
mqudsi committed Oct 20, 2022
1 parent 06f7d75 commit 82e37fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tig.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ parse_options(int argc, const char *argv[], bool pager_mode)
printf("tig version %s\n", TIG_VERSION);
#ifdef NCURSES_VERSION
printf("%s version %s.%d\n",
#ifdef NCURSES_WIDECHAR
#ifdef HAVE_NCURSESW_CURSES_H
"ncursesw",
#else
"ncurses",
Expand Down

0 comments on commit 82e37fd

Please sign in to comment.