mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.0.0948: crash if timer closes window while dragging status line
Problem: Crash if timer closes window while dragging status line. Solution: Check if the window still exists. (Yasuhiro Matsumoto, closes #1979)
This commit is contained in:
@@ -4627,7 +4627,7 @@ nv_screengo(oparg_T *oap, int dir, long dist)
|
||||
nv_mousescroll(cmdarg_T *cap)
|
||||
{
|
||||
# ifdef FEAT_WINDOWS
|
||||
win_T *old_curwin = curwin;
|
||||
win_T *old_curwin = curwin, *wp;
|
||||
|
||||
if (mouse_row >= 0 && mouse_col >= 0)
|
||||
{
|
||||
@@ -4637,7 +4637,10 @@ nv_mousescroll(cmdarg_T *cap)
|
||||
col = mouse_col;
|
||||
|
||||
/* find the window at the pointer coordinates */
|
||||
curwin = mouse_find_win(&row, &col);
|
||||
wp = mouse_find_win(&row, &col);
|
||||
if (wp == NULL)
|
||||
return;
|
||||
curwin = wp;
|
||||
curbuf = curwin->w_buffer;
|
||||
}
|
||||
# endif
|
||||
|
Reference in New Issue
Block a user