vim cannot quit after certain tabs manipulation

2006-08-06 Thread Yakov Lerner

After certain 3-step manipulation with tabs,
can't quit vim with :q!. (vim 7.0.42). Tabline is
not updated properly.

% vim -u NONE -U NONE
ixescmake 1st buffer modified
:tabnewcr create 2nd tab
ixescmake 2nd buffer modified
:tabclose! 1 delete non-last tab

 ^^^ watch the tabline after tabclose command.
 PROBLEM #1 here: tabline shows 2 tabs but this is
   wrong; only 1 tab exist at this point
:tabs   confirm that ony 1 tab exists

:q!
E37: No write since last change (add ! to override)
E162: No write since last change for buffer [No Name]
^ PROBLEM #2: can't quit vim here, must resort to kill

Yakov


Re: vim cannot quit after certain tabs manipulation

2006-08-06 Thread A.J.Mechelynck

Yakov Lerner wrote:

After certain 3-step manipulation with tabs,
can't quit vim with :q!. (vim 7.0.42). Tabline is
not updated properly.

% vim -u NONE -U NONE
ixescmake 1st buffer modified
:tabnewcr create 2nd tab
ixescmake 2nd buffer modified
:tabclose! 1 delete non-last tab

 ^^^ watch the tabline after tabclose command.


My own text-style tabline (recently published one one of these lists) 
shows only one tab. Also, in gvim -u NONE the tabline disappears at this 
point, meaning there is only one tab. I'm using a Huge 7.0.42 with 
GTK2-GNOME GUI. However, with gvim -u NONE I notice a long delay before 
the tab bar changes from Empty to [No Name + ][No Name + ] and the 
cursor returns from the command-line to the file window when _opening_ 
the 2nd tab.


What version/patchlevel of Vim 7 are you using? Have you set 'tabline' 
'showtabline' and/or the e flag of 'guioptions', and to what? What do 
you see with -u NONE ?



 PROBLEM #1 here: tabline shows 2 tabs but this is
   wrong; only 1 tab exist at this point
:tabs   confirm that ony 1 tab exists

:q!
E37: No write since last change (add ! to override)
E162: No write since last change for buffer [No Name]
^ PROBLEM #2: can't quit vim here, must resort to kill

Yakov




After :tabclose! 1 the modified buffer in the closed tab is hidden, 
not abandoned (just like with :only!). Thus you cannot quit Vim except 
with :qa! (which works, I checked), or by bringing the hidden buffer 
to the front and quit!ting it, writing it, or otherwise making it 
unmodified (e.g. :set nomod or undo all changes).


After closing tab 1, :ls! shows 2 modified buffers, the first of which 
is hidden. After :q! I see two buffers, the second of which is hidden. 
Doing :q! again swaps them again. :enew! followed by :q! brings 
(with an error) the modified buffer to the front, with two other buffers 
(both unhidden and unmodified) in the buffer list. Now :q! or :enew! 
| q closes Vim.




Best regards,
Tony.


Re: vim cannot quit after certain tabs manipulation

2006-08-06 Thread A.J.Mechelynck

Yakov Lerner wrote:

On 8/6/06, A.J.Mechelynck [EMAIL PROTECTED] wrote:

Yakov Lerner wrote:



 % vim -u NONE -U NONE
 ixescmake 1st buffer modified
 :tabnewcr create 2nd tab
 ixescmake 2nd buffer modified
 :tabclose! 1 delete non-last tab

  ^^^ watch the tabline after tabclose command.
What do you see with -u NONE ?


This *is* with -u NONE, Antonie. This is console vim,
In gvim, tabline is refreshed as expected. In console vim -u NONE,
tabline is not refreshed. vim 7.0.42.

[...]

Hm. In console Vim, I see the tab line still showing 2 tabs. After 
Ctrl-L it disappears, but the text doesn't go up (there is a blank line 
where the tabs used to be). Setting 'showtabline' to 2 then back to 1 
restores the display to what it should be.


With 'showtabline' set to 2 before opening and closing tabs, the tab 
line is updated as it should, even with (otherwise) -u NONE in console Vim


Hmm... Sounds like a bug to me.



Best regards,
Tony.