mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
2b32053559
commit
f58a593cea
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user