vim-patch:7.4.2212

Problem:    Mark " is not set when closing a window in another tab. (Guraga)
Solution:   Check all tabs for the window to be valid. (based on patch by
            Hirohito Higashi, closes vim/vim#974)

e59215c7dc
This commit is contained in:
Grzegorz Milka
2016-10-18 21:04:57 +02:00
parent 500c485e36
commit 9ca90fdb9f
4 changed files with 32 additions and 3 deletions

View File

@@ -323,7 +323,7 @@ void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last)
wipe_buf = true;
}
if (win_valid(win)) {
if (win_valid_any_tab(win)) {
/* Set b_last_cursor when closing the last window for the buffer.
* Remember the last cursor position and window options of the buffer.
* This used to be only for the current window, but then options like
@@ -402,7 +402,7 @@ void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last)
buf->b_nwindows = nwindows;
buf_freeall(buf, (del_buf ? BFA_DEL : 0) + (wipe_buf ? BFA_WIPE : 0));
if (win_valid(win) && win->w_buffer == buf) {
if (win_valid_any_tab(win) && win->w_buffer == buf) {
win->w_buffer = NULL; // make sure we don't use the buffer now
}