mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 11:38:31 +00:00
vim-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
vim/vim#1979)
989a70c590
This commit is contained in:
@@ -3995,7 +3995,11 @@ static void nv_mousescroll(cmdarg_T *cap)
|
||||
col = mouse_col;
|
||||
|
||||
/* find the window at the pointer coordinates */
|
||||
curwin = mouse_find_win(&row, &col);
|
||||
win_T *const wp = mouse_find_win(&row, &col);
|
||||
if (wp == NULL) {
|
||||
return;
|
||||
}
|
||||
curwin = wp;
|
||||
curbuf = curwin->w_buffer;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user