summaryrefslogtreecommitdiffstats
path: root/CRT.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2020-11-01 01:09:51 +0100
committerBenny Baumann <BenBE@geshi.org>2020-11-02 22:15:01 +0100
commit45869513bfebba80cc2ab42e4218f68b34b1e6ac (patch)
treef064631dbff141bf1c945db8cff40b7bb82fd169 /CRT.c
parent61e14d4bb25268593019e6df3eb02264b4ac8e0e (diff)
Embracing branches
Diffstat (limited to 'CRT.c')
-rw-r--r--CRT.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/CRT.c b/CRT.c
index 38ba9da3..08f1cef3 100644
--- a/CRT.c
+++ b/CRT.c
@@ -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

© 2014-2024 Faster IT GmbH | imprint | privacy policy