1
0
forked from aniani/vim

patch 8.2.1166: once mouse move events are enabled getchar() returns them

Problem:    Once mouse move events are enabled getchar() returns them.
Solution:   Ignore K_MOUSEMOVE in getchar(). (closes #6424)
This commit is contained in:
Bram Moolenaar
2020-07-09 19:16:35 +02:00
parent e4358906fd
commit ae97b94176
3 changed files with 7 additions and 4 deletions

View File

@@ -5023,8 +5023,9 @@ getchar([expr]) *getchar()*
When the user clicks a mouse button, the mouse event will be
returned. The position can then be found in |v:mouse_col|,
|v:mouse_lnum|, |v:mouse_winid| and |v:mouse_win|.
|getmousepos()| can also be used. This example positions the
mouse as it would normally happen: >
|getmousepos()| can also be used. Mouse move events will be
ignored.
This example positions the mouse as it would normally happen: >
let c = getchar()
if c == "\<LeftMouse>" && v:mouse_win > 0
exe v:mouse_win . "wincmd w"