aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-08-06 19:16:42 +0200
committerGitHub <noreply@github.com>2018-08-06 19:16:42 +0200
commit1593ee7cf21f77168531c959fa9e73933b502d2e (patch)
tree2c2991996429def33fc192009cc408f809c6e687 /src/nvim/normal.c
parent3aca372ac88b4864c2da00780c01f207bdc58435 (diff)
parent41dbb69a85302e9af5c8b76e0d8217ad7d197f8a (diff)
downloadrneovim-1593ee7cf21f77168531c959fa9e73933b502d2e.tar.gz
rneovim-1593ee7cf21f77168531c959fa9e73933b502d2e.tar.bz2
rneovim-1593ee7cf21f77168531c959fa9e73933b502d2e.zip
Merge #8820 from janlazo/vim-8.0.0671
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index a695620801..225fe4aa9a 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -3994,8 +3994,12 @@ static void nv_mousescroll(cmdarg_T *cap)
row = mouse_row;
col = mouse_col;
- /* find the window at the pointer coordinates */
- curwin = mouse_find_win(&row, &col);
+ // find the window at the pointer coordinates
+ win_T *const wp = mouse_find_win(&row, &col);
+ if (wp == NULL) {
+ return;
+ }
+ curwin = wp;
curbuf = curwin->w_buffer;
}