mirror of
https://github.com/neovim/neovim.git
synced 2026-08-28 18:11:47 +00:00
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 vim/vim#6424)
ae97b94176
This commit is contained in:
@@ -4316,8 +4316,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|. This
|
||||
example positions the mouse as it would normally happen: >
|
||||
|v:mouse_lnum|, |v:mouse_winid| and |v:mouse_win|.
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user