]> granicus.if.org Git - vim/commitdiff
patch 9.0.0136: after CTRL-Left-mouse click a mouse scroll also has CTRL v9.0.0136
authorBram Moolenaar <Bram@vim.org>
Wed, 3 Aug 2022 14:48:33 +0000 (15:48 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 3 Aug 2022 14:48:33 +0000 (15:48 +0100)
Problem:    After CTRL-Left-mouse click a mouse scroll also has CTRL.
Solution:   Reset orig_mouse_code also for wheel events. (closes #10840)

src/mouse.c
src/version.c

index e92a73c033a90f77a3127d13ee5cfbf0948cc102..535e9a29264fa9c2f1f209be24d37a5e0dc402f3 100644 (file)
@@ -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;
index 33f61aadfce2907016d6a1bcd35f30029f3ec9f0..b44c2483ec33bc15bfcbee7d01255c2e421fcc31 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    136,
 /**/
     135,
 /**/