diff options
author | axel <axel@liljencrantz.se> | 2006-08-09 21:34:24 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-08-09 21:34:24 +1000 |
commit | 248d11c4621679457ada0d71c67c5944cf750302 (patch) | |
tree | e7cad6031de044cafabec22a30a2830e62b9facf /reader.c | |
parent | 6b1570b745c71c59c4ee0fa07482776a2f6b890a (diff) |
Only write out titlebar message if it is of non-zero length
darcs-hash:20060809113424-ac50b-59988efa4dd788d6623023b642fd96989c4c9ada.gz
Diffstat (limited to 'reader.c')
-rw-r--r-- | reader.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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(); |