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
ix<esc> " make 1st buffer modified
:tabnew<cr> " create 2nd tab
ix<esc> " make 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.