mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.0.0483: illegal memory access when using :all
Problem: Illegal memory access when using :all. (Dominique Pelle) Solution: Adjust the cursor position right after setting "curwin".
This commit is contained in:
@@ -2450,6 +2450,10 @@ win_close(win_T *win, int free_buf)
|
||||
#endif
|
||||
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))
|
||||
win_equal(curwin, TRUE, dir);
|
||||
|
Reference in New Issue
Block a user