vimrc: only set title if the caller requests it or in gvim
authorFrank Terbeck <ft@bewatermyfriend.org>
Thu, 2 Apr 2009 10:59:55 +0000 (12:59 +0200)
committerFrank Terbeck <ft@bewatermyfriend.org>
Thu, 2 Apr 2009 10:59:55 +0000 (12:59 +0200)
This should rule out problems with vim breaking screen titles when called
from programs like w3m or mutt.

etc/vim/vimrc

index 8cc5eca..2a7dd0f 100644 (file)
@@ -96,7 +96,7 @@
   set dictionary=/usr/share/dict/word " used with CTRL-X CTRL-K
 
 """ set the screen hardstatus to vim(filename.ext)
-  if (&term =~ '^screen') && ($NOPRECMD != '1')
+  if ((&term =~ '^screen') && ($VIM_PLEASE_SET_TITLE =~ '^yes$') || has('gui_running'))
     set t_ts=\ek
     set t_fs=\e\
     set title