mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 19:03:38 +08:00
Add highlighting of a few missing escapes
darcs-hash:20060527134026-ac50b-3ff05d1fe0246d37c1be6e4a6d4492bf411808b7.gz
This commit is contained in:
parent
bffff77d17
commit
c8b04f70cf
31
highlight.c
31
highlight.c
|
@ -112,11 +112,42 @@ static void highlight_param( const wchar_t * buff,
|
|||
|
||||
switch( buff[++in_pos] )
|
||||
{
|
||||
case L'~':
|
||||
case L'%':
|
||||
{
|
||||
if( in_pos == 1 )
|
||||
{
|
||||
color[start_pos] = HIGHLIGHT_ESCAPE;
|
||||
color[in_pos+1] = HIGHLIGHT_NORMAL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case L',':
|
||||
{
|
||||
if( bracket_count )
|
||||
{
|
||||
color[start_pos] = HIGHLIGHT_ESCAPE;
|
||||
color[in_pos+1] = HIGHLIGHT_NORMAL;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case L'n':
|
||||
case L'r':
|
||||
case L't':
|
||||
case L'b':
|
||||
case L'e':
|
||||
case L'*':
|
||||
case L'?':
|
||||
case L'$':
|
||||
case L'(':
|
||||
case L')':
|
||||
case L'{':
|
||||
case L'}':
|
||||
case L'\'':
|
||||
case L'"':
|
||||
{
|
||||
color[start_pos]=HIGHLIGHT_ESCAPE;
|
||||
color[in_pos+1]=HIGHLIGHT_NORMAL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user