From ab78075d06e254fc9643b5f25eb460c96678e423 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 1 Apr 2012 00:53:47 -0700 Subject: [PATCH] Default all xterms into term256 --- input.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/input.cpp b/input.cpp index ac8389a13..7e910d00b 100644 --- a/input.cpp +++ b/input.cpp @@ -314,7 +314,12 @@ void update_fish_term256(void) support_term256 = from_string(fish_term256); } else { env_var_t term = env_get_string(L"TERM"); - support_term256 = ! term.missing() && term.find(L"256color") != wcstring::npos; + if (term.missing()) { + support_term256 = false; + } else { + // assume that all xterms are 256 + support_term256 = (term.find(L"256color") != wcstring::npos || term.find(L"xterm") != wcstring::npos); + } } output_set_supports_term256(support_term256); }