Check whether '$TERM' starts with 'screen' instead of whether it's an exact match when determining if \ek\e\\ should be recognized.

There are various terminfo entries for screen that should be recognized aside from simply 'screen' such as 'screen-256color' and 'screen-bce'.

darcs-hash:20071013184358-35ec8-5e85add3cc1667781590e12118a98ec6641bc714.gz
This commit is contained in:
James Vega 2007-10-14 04:43:58 +10:00
parent 8904ab47aa
commit afa0ed124f

View file

@ -201,7 +201,7 @@ static int calc_prompt_width( wchar_t *prompt )
if( prompt[j+1] == L'k' )
{
wchar_t *term_name = env_get( L"TERM" );
if( term_name && wcscmp( term_name, L"screen" ) == 0 )
if( term_name && wcsstr( term_name, L"screen" ) == term_name )
{
wchar_t *end;
j+=2;