mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-03 04:05:25 +08:00
Add support for detecting and handling the screen-specific \ek\e\ escape sequence for setting the titlebar message in the prompt calculating code.
darcs-hash:20061114162125-ac50b-debe872f5916328f74a4560d0833b33f9eb89a40.gz
This commit is contained in:
parent
ab162c6c25
commit
4768b37531
26
screen.c
26
screen.c
@ -186,6 +186,32 @@ static int calc_prompt_width( wchar_t *prompt )
|
|||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !found )
|
||||||
|
|
||||||
|
{
|
||||||
|
wchar_t *term_name = env_get( L"TERM" );
|
||||||
|
|
||||||
|
if( term_name && wcscmp( term_name, L"screen" ) == 0 )
|
||||||
|
{
|
||||||
|
if( prompt[j+1] == L'k' )
|
||||||
|
{
|
||||||
|
wchar_t *end;
|
||||||
|
j+=2;
|
||||||
|
found = 1;
|
||||||
|
end = wcsstr( &prompt[j], L"\e\\" );
|
||||||
|
if( end )
|
||||||
|
{
|
||||||
|
j = (end-prompt)+1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if( prompt[j] == L'\t' )
|
else if( prompt[j] == L'\t' )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user