summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Fonseca <fonseca@diku.dk>2012-08-10 09:57:53 -0400
committerJonas Fonseca <fonseca@diku.dk>2012-10-02 10:40:57 -0400
commit29ea9b6c8aa3f673ca311fbda5685c2efe375092 (patch)
treeef66ad36edacef0a7dd7464f6f3fab222def0993
parent690c03da4e0119029fd7402bfead149d73599b68 (diff)
[GH #72] Convert output to ASCII//TRANSLIT unless using ncurseswno-ncursesw
-rw-r--r--NEWS2
-rw-r--r--tig.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index dbbb1516..106f06da 100644
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,8 @@ Improvements:
and diff view, e.g. `tig --no-walk --stdin < cherry-picks.txt`.
- Add option to disable focusing of the child view when it's opened.
Disable using: `set focus-child = no`. (GH #83)
+ - Convert output to ASCII//TRANSLIT when ncurses has no wide-char
+ support. (GH #72)
Bug fixes:
diff --git a/tig.c b/tig.c
index d7353910..9caacfaf 100644
--- a/tig.c
+++ b/tig.c
@@ -8245,9 +8245,13 @@ main(int argc, const char *argv[])
signal(SIGINT, quit);
signal(SIGPIPE, SIG_IGN);
+#if defined(HAVE_NCURSESW) || defined(NCURSES_WIDECHAR)
if (setlocale(LC_ALL, "")) {
codeset = nl_langinfo(CODESET);
}
+#else
+ codeset = "ascii";
+#endif
foreach_view(view, i) {
add_keymap(&view->ops->keymap);