mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-25 06:41:15 -03:00
Begin to rework term256 support
This commit is contained in:
15
input.cpp
15
input.cpp
@@ -324,10 +324,19 @@ int input_init()
|
||||
output_set_term( term.c_str() );
|
||||
|
||||
input_terminfo_init();
|
||||
|
||||
/* Infer term256 support. Consider using t_Co */
|
||||
env_var_t fish_term256 = env_get_string(L"fish_term256");
|
||||
bool support_term256;
|
||||
if (! fish_term256.missing_or_empty()) {
|
||||
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;
|
||||
}
|
||||
output_set_supports_term256(support_term256);
|
||||
|
||||
/*
|
||||
If we have no keybindings, add a few simple defaults
|
||||
*/
|
||||
/* If we have no keybindings, add a few simple defaults */
|
||||
if( mapping_list.size() )
|
||||
{
|
||||
input_mapping_add( L"", L"self-insert" );
|
||||
|
||||
Reference in New Issue
Block a user