mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-26 14:01:44 +08:00
Modified highlight.cpp to use env_get_string().
This commit is contained in:
parent
72cfdbbb4e
commit
d0e18e3d20
@ -190,19 +190,24 @@ int highlight_get_color( int highlight )
|
||||
}
|
||||
}
|
||||
|
||||
wchar_t *val = env_get( highlight_var[idx]);
|
||||
wcstring val_wstr = env_get_string( highlight_var[idx]);
|
||||
const wchar_t *val = val_wstr.empty()?NULL:val_wstr.c_str();
|
||||
|
||||
// debug( 1, L"%d -> %d -> %ls", highlight, idx, val );
|
||||
|
||||
if( val == 0 )
|
||||
val = env_get( highlight_var[0]);
|
||||
if( val == 0 ) {
|
||||
val_wstr = env_get_string( highlight_var[0]);
|
||||
val = val_wstr.empty()?NULL:val_wstr.c_str();
|
||||
}
|
||||
|
||||
if( val )
|
||||
result = output_color_code( val );
|
||||
|
||||
if( highlight & HIGHLIGHT_VALID_PATH )
|
||||
{
|
||||
wchar_t *val2 = env_get( L"fish_color_valid_path" );
|
||||
wcstring val2_wstr = env_get_string( L"fish_color_valid_path" );
|
||||
const wchar_t *val2 = val2_wstr.empty()?NULL:val2_wstr.c_str();
|
||||
|
||||
int result2 = output_color_code( val2 );
|
||||
if( result == FISH_COLOR_NORMAL )
|
||||
result = result2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user