vim-patch:8.0.0483

Problem:    Illegal memory access when using :all. (Dominique Pelle)
Solution:   Adjust the cursor position right after setting "curwin".

f79225ed4f
This commit is contained in:
Justin M. Keyes 2017-03-22 01:26:32 +01:00
parent 2b32053559
commit f58a593cea
2 changed files with 17 additions and 3 deletions

View File

@ -67,6 +67,18 @@ function Test_window_cmd_wincmd_gf()
augroup! test_window_cmd_wincmd_gf
endfunc
func Test_next_split_all()
" This was causing an illegal memory access.
n x
norm axxx
split
split
s/x
s/x
all
bwipe!
endfunc
func Test_window_quit()
e Xa
split Xb

View File

@ -2018,10 +2018,12 @@ int win_close(win_T *win, int free_buf)
}
curbuf = curwin->w_buffer;
close_curwin = TRUE;
// The cursor position may be invalid if the buffer changed after last
// using the window.
check_cursor();
}
if (p_ea
&& (*p_ead == 'b' || *p_ead == dir)
) {
if (p_ea && (*p_ead == 'b' || *p_ead == dir)) {
win_equal(curwin, true, dir);
} else {
win_comp_pos();