]> granicus.if.org Git - vim/commitdiff
patch 9.0.0812: GUI mouse scrollwheel mappings don't work v9.0.0812
authorChristopher Plewright <chris@createng.com>
Fri, 21 Oct 2022 12:03:33 +0000 (13:03 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 21 Oct 2022 12:03:33 +0000 (13:03 +0100)
Problem:    GUI mouse scrollwheel mappings don't work.
Solution:   Add check for "gui.in_use". (Christopher Plewright, closes #11418)

src/getchar.c
src/version.c

index da8132cbfff3ca4c3d2b029144b072c2dd7e5d63..5d0c99438f1f0f42d6af1f147f0dcc79e43e9c6c 100644 (file)
@@ -2529,6 +2529,9 @@ handle_mapping(
                && (typebuf.tb_buf[typebuf.tb_off + 1] == KS_MODIFIER
 # if defined(MSWIN)
                    || (typebuf.tb_len >= 3
+#  ifdef FEAT_GUI
+                     && !gui.in_use
+#  endif
                      && typebuf.tb_buf[typebuf.tb_off + 1] == KS_EXTRA
                      && (typebuf.tb_buf[typebuf.tb_off + 2] == KE_MOUSEUP
                        || typebuf.tb_buf[typebuf.tb_off + 2] == KE_MOUSEDOWN
@@ -2542,7 +2545,7 @@ handle_mapping(
            // The GUI code sends CSI KS_MODIFIER {flags}, but mappings expect
            // K_SPECIAL KS_MODIFIER {flags}.
            // MS-Windows sends mouse scroll events CSI KS_EXTRA {what}, but
-           // mappings expect K_SPECIAL KS_EXTRA {what}.
+           // non-GUI mappings expect K_SPECIAL KS_EXTRA {what}.
            tb_c1 = K_SPECIAL;
        }
 #endif
index 662835ebf80fb327c776b547806a2da9aa91f5fd..f8f0c95aca7aedc9bc2498cd1441d0468dbc4f78 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    812,
 /**/
     811,
 /**/