diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-03-14 09:13:17 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-04-26 19:17:16 -0400 |
commit | 355dffdd769ffb12ad3e54528fb6910b08facb6c (patch) | |
tree | efad2325636f7827038f4f8eadfe3b2ea7358cea /src/nvim/normal.c | |
parent | 7d028f07657f1839819f81bade576591d2a778f9 (diff) | |
download | rneovim-355dffdd769ffb12ad3e54528fb6910b08facb6c.tar.gz rneovim-355dffdd769ffb12ad3e54528fb6910b08facb6c.tar.bz2 rneovim-355dffdd769ffb12ad3e54528fb6910b08facb6c.zip |
vim-patch:8.0.1138: click in window toolbar starts Visual mode
Problem: Click in window toolbar starts Visual mode.
Solution: Add the MOUSE_WINBAR flag.
https://github.com/vim/vim/commit/eb163d73b11c10b461a2839530173a33d7915a33
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 58993426dd..ea8155f6b8 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -2559,7 +2559,14 @@ do_mouse ( * JUMP! */ jump_flags = jump_to_mouse(jump_flags, - oap == NULL ? NULL : &(oap->inclusive), which_button); + oap == NULL ? NULL : &(oap->inclusive), + which_button); + + // A click in the window toolbar has no side effects. + if (jump_flags & MOUSE_WINBAR) { + return false; + } + moved = (jump_flags & CURSOR_MOVED); in_status_line = (jump_flags & IN_STATUS_LINE); in_sep_line = (jump_flags & IN_SEP_LINE); |