Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vim does not correctly restore terminal title of xfce-terminal when exiting #82

Closed
GoogleCodeExporter opened this issue Aug 18, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

Using the Xfce Terminal (0.4.8 as in xubuntu-12.04), I see
a bug with the terminal title when exiting Vim.  Vim does
not correctly restore the terminal title when exiting.

What steps will reproduce the problem?

1. Before starting Vim, look at the terminal title (top of terminal
   window). It says "Terminal".

2. Start Vim from terminal with:  vim -u NONE

3. The terminal window is changed by Vim and becomes:
   "Terminal - [No Name] - VIM"

4. Exit vim with ":q"

5. The terminal window becomes "Terminal - Terminal". 
   That's a bug. I would expect it to be restored to "Terminal"
   when exiting Vim.

6. If I repeat the steps 2, 3, 4, the terminal title
   becomes "Terminal - Terminal - Terminal".  Each time I exit
   Vim "- Terminal" is appended to the previous title which is
   not expected. So the terminal title keeps growing and growing
   as I start/exit Vim.

What version of the product are you using? On what operating system?

Bug happens with Vim-7.3.672 on xubuntu-12.04 (x86_64).

:version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 24 2012 16:32:29)
Included patches: 1-672
Compiled by pel@nl1lxd-102827
Huge version with GTK2 GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard
+cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope 
+cursorbind +cursorshape
 +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi
+file_in_path +find_in_path +float +folding -footer +fork() +gettext 
-hangul_input +iconv
+insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent 
+listcmds +localmap -lua
+menu +mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm 
-mouse_jsbterm +mouse_netterm
-mouse_sysmouse +mouse_xterm +mouse_urxvt +mouse_sgr +multi_byte +multi_lang 
-mzscheme +netbeans_intg
+path_extra -perl +persistent_undo +postscript +printer +profile -python 
-python3 +quickfix +reltime
+rightleft -ruby +scrollbind +signs +smartindent -sniff +startuptime 
+statusline -sun_workshop +syntax
 +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace 
+wildignore +wildmenu
+windows +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard 
-xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread 
-I/usr/include/gtk-2.0 -I/us
r/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/gdk-p
ixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ 
-I/usr/include/glib-2.0 -I/usr/lib/x86_
64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 
-I/usr/include/libpng12
    -O1 -g -faddress-sanitizer -fno-omit-frame-pointer
Linking: clang   -O1 -g -faddress-sanitizer -fno-omit-frame-pointer -o vim   
-lgtk-x11-2.0 -lgdk-x11-2.
0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo 
-lpango-1.0 -lfreetype -
lfontconfig -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM 
-lICE -lm -ltinfo -lnsl
  -lselinux -lacl -lattr -lgpm


Please provide any additional information below.

Bug does not happen when I start Vim with: vim -u NONE -c 'set notitle'.

Bug happens using Vim-7.3.672. But if I use the default Vim that comes
with xubuntu-12.04 (/usr/bin/vim) which is Vim-7.3.429, then bug does
not happen.

Furthermore, I cannot reproduce the bug with xterm or with
gnome-terminal.  It only happens with the Xfce terminal. 
So perhaps it's a bug with Xfce terminal.  But since older
Vim does not have this bug, it may also be Vim's fault.

Original issue reported on code.google.com by dominiqu...@gmail.com on 26 Sep 2012 at 9:40

@GoogleCodeExporter
Copy link
Author

Sounds like a problem with Xfce.  I assume you have the 'term' option set to 
"xterm".
Most likely, when Vim fetches the current window title it is "Terminal", so 
that is what Vim writes back.  But then Xfce prepends "Terminal - ".  I do not 
think Vim can solve this.  Well, if it is always "Terminal", not translated or 
ever changed, there would be a Vim termcap option to remove that before 
restoring the the title.

Original comment by brammool...@gmail.com on 26 Sep 2012 at 8:18

@GoogleCodeExporter
Copy link
Author

> Sounds like a problem with Xfce.

That's quite possible. I'm not 100% sure yet.

> I assume you have the 'term' option set to "xterm".

$ echo $TERM
xterm-256color

Trying with "export TERM=xterm" results in the same bug.

I'll try to debug it when I have time.  

I also found the same bug described in Debian here:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575795

Original comment by dominiqu...@gmail.com on 27 Sep 2012 at 10:52

@GoogleCodeExporter
Copy link
Author

i raised this yonks ago..

https://bugzilla.xfce.org/show_bug.cgi?id=7460

compiling '--without-x' is a work around, but then you lose the clipboard 
buffer interation

Original comment by elbeardmorez on 27 Nov 2012 at 6:01

@GoogleCodeExporter
Copy link
Author

Since I upgraded from xubuntu-12.04 to xubuntu-12.10, this bug no longer 
happens. It probably had nothing to do with Vim but was a bug in the xfce 
terminal which now appears to be fixed. 

Original comment by dominiqu...@gmail.com on 26 Dec 2012 at 4:27

@GoogleCodeExporter
Copy link
Author

Original comment by chrisbr...@googlemail.com on 30 Sep 2014 at 6:20

  • Changed state: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant