Mercurial > vim
changeset 29591:eb07470d0395 v9.0.0136
patch 9.0.0136: after CTRL-Left-mouse click a mouse scroll also has CTRL
Commit: https://github.com/vim/vim/commit/d6212b80d6d49d4d890c3141b7c6b83f899333b0
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 3 15:48:33 2022 +0100
patch 9.0.0136: after CTRL-Left-mouse click a mouse scroll also has CTRL
Problem: After CTRL-Left-mouse click a mouse scroll also has CTRL.
Solution: Reset orig_mouse_code also for wheel events. (closes https://github.com/vim/vim/issues/10840)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 03 Aug 2022 17:00:06 +0200 |
parents | d161a4dba51e |
children | 53b06cfe2835 |
files | src/mouse.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mouse.c +++ b/src/mouse.c @@ -2403,7 +2403,7 @@ check_termcode_mouse( // Apparently 0x23 and 0x24 are used by rxvt scroll wheel. // And 0x40 and 0x41 are used by some xterm emulator. wheel_code = mouse_code - (mouse_code >= 0x40 ? 0x40 : 0x23) - + MOUSEWHEEL_LOW; + + MOUSEWHEEL_LOW; } # endif @@ -2788,8 +2788,10 @@ check_termcode_mouse( is_drag = TRUE; current_button = held_button; } - else if (wheel_code == 0) + else { + if (wheel_code == 0) + { # ifdef CHECK_DOUBLE_CLICK # ifdef FEAT_MOUSE_GPM /* @@ -2849,7 +2851,8 @@ check_termcode_mouse( orig_num_clicks = NUM_MOUSE_CLICKS(mouse_code); # endif is_click = TRUE; - orig_mouse_code = mouse_code; + } + orig_mouse_code = mouse_code; } if (!is_drag) held_button = mouse_code & MOUSE_CLICK_MASK;