mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +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:
@@ -9493,6 +9493,9 @@ static void f_getchar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
/* Find the window at the mouse coordinates and compute the
|
||||
* text position. */
|
||||
win = mouse_find_win(&row, &col);
|
||||
if (win == NULL) {
|
||||
return;
|
||||
}
|
||||
(void)mouse_comp_pos(win, &row, &col, &lnum);
|
||||
for (wp = firstwin; wp != win; wp = wp->w_next)
|
||||
++winnr;
|
||||
|
Reference in New Issue
Block a user