mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
For for crash when typing backslash c
This commit is contained in:
parent
a0bb2cdc6e
commit
5ae77b4317
2 changed files with 39 additions and 39 deletions
|
@ -282,6 +282,7 @@ static void highlight_param( const wcstring &buffstr, std::vector<int> &colors,
|
||||||
else if( wcschr( L"c", buff[in_pos] ) )
|
else if( wcschr( L"c", buff[in_pos] ) )
|
||||||
{
|
{
|
||||||
colors.at(start_pos)=HIGHLIGHT_ESCAPE;
|
colors.at(start_pos)=HIGHLIGHT_ESCAPE;
|
||||||
|
if (in_pos+2 < colors.size())
|
||||||
colors.at(in_pos+2)=normal_status;
|
colors.at(in_pos+2)=normal_status;
|
||||||
}
|
}
|
||||||
else if( wcschr( L"uUxX01234567", buff[in_pos] ) )
|
else if( wcschr( L"uUxX01234567", buff[in_pos] ) )
|
||||||
|
|
|
@ -429,8 +429,7 @@ static wint_t input_try_mapping( const input_mapping_t &m)
|
||||||
input_unreadch( c );
|
input_unreadch( c );
|
||||||
|
|
||||||
const wchar_t *str = m.seq.c_str();
|
const wchar_t *str = m.seq.c_str();
|
||||||
for( j=0; str[j] != L'\0' &&
|
for( j=0; str[j] != L'\0' && str[j] == (c=input_common_readch( j>0 )); j++ )
|
||||||
str[j] == (c=input_common_readch( j>0 )); j++ )
|
|
||||||
;
|
;
|
||||||
|
|
||||||
if( str[j] == L'\0' )
|
if( str[j] == L'\0' )
|
||||||
|
|
Loading…
Reference in a new issue