diff options
author | Benny Baumann <BenBE@geshi.org> | 2020-11-01 01:09:51 +0100 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2020-11-02 22:15:01 +0100 |
commit | 45869513bfebba80cc2ab42e4218f68b34b1e6ac (patch) | |
tree | f064631dbff141bf1c945db8cff40b7bb82fd169 /CRT.c | |
parent | 61e14d4bb25268593019e6df3eb02264b4ac8e0e (diff) |
Embracing branches
Diffstat (limited to 'CRT.c')
-rw-r--r-- | CRT.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -619,13 +619,18 @@ void CRT_init(int delay, int colorScheme, bool allowUnicode) { keypad(stdscr, true); mouseinterval(0); curs_set(0); - if (has_colors()) + + if (has_colors()) { start_color(); + } + CRT_termType = getenv("TERM"); - if (String_eq(CRT_termType, "linux")) + if (String_eq(CRT_termType, "linux")) { CRT_scrollHAmount = 20; - else + } else { CRT_scrollHAmount = 5; + } + if (String_startsWith(CRT_termType, "xterm") || String_eq(CRT_termType, "vt220")) { define_key("\033[H", KEY_HOME); define_key("\033[F", KEY_END); @@ -670,10 +675,11 @@ void CRT_init(int delay, int colorScheme, bool allowUnicode) { setlocale(LC_CTYPE, ""); #ifdef HAVE_LIBNCURSESW - if (allowUnicode && String_eq(nl_langinfo(CODESET), "UTF-8")) + if (allowUnicode && String_eq(nl_langinfo(CODESET), "UTF-8")) { CRT_utf8 = true; - else + } else { CRT_utf8 = false; + } #else (void) allowUnicode; #endif |