Bug 68337 - Using VIM repeats window title
Summary: Using VIM repeats window title
Status: RESOLVED INTENTIONAL
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 73992 79164 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-16 00:28 UTC by Michael Pyne
Modified: 2004-05-19 23:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Pyne 2003-11-16 00:28:52 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.2.3 w/ Propolice stack protector
OS:          Linux

When using VIM (6.2.98), which uses escape sequences in order to set the xterm window title, the Konsole title has one more "Shell - Konsole" added to it after you leave VIM.  After a few VIM editing sessions, your title bar looks something like: "Shell - Konsole - Shell - Konsole - Shell..."

This bug does not occur in xterm.
Comment 1 Michael Pyne 2003-11-17 06:48:24 UTC
It looks like something to do with the interplay of updateTitle() in konsole.cpp and fullTitle() in session.cpp, mixed with vim's title-detection code.  However, I tried starting up xterm with the title changed to "Shell - Konsole", and it still worked correctly on xterm.  So I can't really find out why the bug is occuring, because during the execution of fullTitle(), title is correct (according to some debugging statements), and userTitle SHOULD have been reset by the call to setUserTitle().
Comment 2 Stephan Binner 2004-02-15 18:43:07 UTC
Same as report 73992?
Comment 3 Michael Pyne 2004-03-13 22:31:11 UTC
This bug doesn't seem to occur with KDE 3.2.1 and VIM 6.2.  I haven't found an alternative program that would cause this behavior, so I am tempted to say it's now fixed. :-)

Anyone else who can confirm this?
Comment 4 Troy A. Johnson 2004-03-13 22:40:52 UTC
Not fixed.  I'm running KDE 3.2.1 and VIM 6.2 from Debian Unstable.

I can reproduce it by creating a new Konsole tab, causing title "Shell - Konsole", opening a nonexisting file ("vim foo") causing title "foo (~) - VIM - Shell - Konsole", saving the file, and quitting.  The title is then "Shell - Konsole - Shell - Konsole".
Comment 5 Michael Pyne 2004-03-13 22:49:09 UTC
Ah, I found out what was going on.  For some reason (looks like Gentoo changed the Vim-with-X-Windows support flag), Vim no longer tries to update the title on Konsole (or, for that matter, xterm).  I will reinstall Vim with the appropriate flag.
Comment 6 andy 2004-04-10 18:19:14 UTC
*** Bug 73992 has been marked as a duplicate of this bug. ***
Comment 7 andy 2004-04-10 18:20:10 UTC
Also occuring on FreeBSD with KDE 3.2.1 and vim 6.2.383
Comment 8 Matt Rogers 2004-04-14 04:05:37 UTC
*** Bug 79164 has been marked as a duplicate of this bug. ***
Comment 9 Tomas Hoger 2004-04-30 14:19:28 UTC
Just a note: this problem is *not* Vim specific.  I managed to reproduce it with elinks too (older Debian package 0.4.2.99-1, it can not be reproduced with latest 0.9.1-1, because it is no longer built against xlibs).  Problem seems to occur when application tries to *restore* previous xterm/konsole title.  Konsole adds extra "Shell - Konsole" to that title every time.  Tested with konsole from KDE 3.2.2.

Hope this can help!
Comment 10 Stephan Binner 2004-05-11 19:35:04 UTC
> Problem seems to occur when application tries to *restore* previous xterm/konsole title.

And why do VIM & Co try to do this? Not every terminal is as dumb as xterm ;-)...

The best plan is that you file a report to the VIM authors and tell them they should only "try" to reset the window title to the one at startup if "ESC ] 2; BEL" does NOT change/reset the title.

I don't see a way how this can be fixed or worked-around in Konsole (remember session renaming after shell command sartup is possible).
Comment 11 Stephan Binner 2004-05-11 19:45:02 UTC
Btw, gnome-terminal also resets title with "ESC ] 2; BEL" and shows the same behavior with VIM and "dynamic-set title goes before/after title" setting.
Comment 12 Ernst de Haan 2004-05-11 22:23:13 UTC
It seems to me that this behaviour was introduced in KDE 3.2.0 or 3.2.1. If that is true, what caused the problem to come up anyway? Can that not be rolled back or at least investigated?

Or has the problem always existed?
Comment 13 Stephan Binner 2004-05-11 22:39:10 UTC
There was no change in the relevant code parts between KDE 3.1 and KDE 3.2. Perhaps KDE 3.1's window manager didn't support the querying for window title name correctly if you're right that it didn't happen with KDE 3.1?
Comment 14 Tomas Hoger 2004-05-19 23:17:13 UTC
I tested with KDE 3.1.4's konsole and vim 6.2.  With default config, vim does *not* change konsole's title (however, it does change xterm's title).  When I force vim to change title (by adding 'set title' to .vimrc), it changes konsole title to e.g. 'foobar (~) - VIM - Shell - Konsole' and at exit to 'Thanks for flying Vim - Shell - Konsole'.

Just my 2c ;)