Default all xterms into term256

This commit is contained in:
ridiculousfish 2012-04-01 00:53:47 -07:00
parent 52070ea577
commit ab78075d06

View file

@ -314,7 +314,12 @@ void update_fish_term256(void)
support_term256 = from_string<bool>(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);
}