Only write out titlebar message if it is of non-zero length

darcs-hash:20060809113424-ac50b-59988efa4dd788d6623023b642fd96989c4c9ada.gz
This commit is contained in:
axel 2006-08-09 21:34:24 +10:00
parent 6b1570b745
commit 248d11c462

View file

@ -655,12 +655,15 @@ void reader_write_title()
if( exec_subshell( title, &l ) != -1 )
{
int i;
writestr( L"\e]2;" );
for( i=0; i<al_get_count( &l ); i++ )
if( al_get_count( &l ) > 0 )
{
writestr( (wchar_t *)al_get( &l, i ) );
writestr( L"\e]2;" );
for( i=0; i<al_get_count( &l ); i++ )
{
writestr( (wchar_t *)al_get( &l, i ) );
}
writestr( L"\7" );
}
writestr( L"\7" );
}
proc_pop_interactive();