diff options
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index a695620801..001972103c 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -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; } |