changeset 30956:ff798e6f4599 v9.0.0812

patch 9.0.0812: GUI mouse scrollwheel mappings don't work Commit: https://github.com/vim/vim/commit/7fa02bcb3b8011961995e617423a6f8f531b6e4d Author: Christopher Plewright <chris@createng.com> Date: Fri Oct 21 13:03:33 2022 +0100 patch 9.0.0812: GUI mouse scrollwheel mappings don't work Problem: GUI mouse scrollwheel mappings don't work. Solution: Add check for "gui.in_use". (Christopher Plewright, closes https://github.com/vim/vim/issues/11418)
author Bram Moolenaar <Bram@vim.org>
date Fri, 21 Oct 2022 14:15:04 +0200
parents 9d51e019ffd7
children 10e535aa2e65
files src/getchar.c src/version.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -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
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    812,
+/**/
     811,
 /**/
     810,