]> granicus.if.org Git - vim/commitdiff
patch 8.1.1323: 'mouse' option is reset when using GPM mouse v8.1.1323
authorBram Moolenaar <Bram@vim.org>
Sat, 11 May 2019 19:38:58 +0000 (21:38 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 11 May 2019 19:38:58 +0000 (21:38 +0200)
Problem:    'mouse' option is reset when using GPM mouse.
Solution:   Add flag for GPM mouse.

src/term.c
src/version.c

index 29d4025053a7d0f9b5f37efcac22f95389e45054..fb002ec81be6de37864fcacb056454fb2dca2d04 100644 (file)
@@ -2108,8 +2108,9 @@ set_termname(char_u *term)
 #  define HMT_JSBTERM  8
 #  define HMT_PTERM    16
 #  define HMT_URXVT    32
-#  define HMT_SGR      64
-#  define HMT_SGR_REL  128
+#  define HMT_GPM      64
+#  define HMT_SGR      128
+#  define HMT_SGR_REL  256
 static int has_mouse_termcode = 0;
 # endif
 
@@ -2149,6 +2150,11 @@ set_mouse_termcode(
     if (n == KS_URXVT_MOUSE)
        has_mouse_termcode |= HMT_URXVT;
     else
+#   endif
+#   ifdef FEAT_MOUSE_GPM
+    if (n == KS_GPM_MOUSE)
+       has_mouse_termcode |= HMT_GPM;
+    else
 #   endif
     if (n == KS_SGR_MOUSE)
        has_mouse_termcode |= HMT_SGR;
@@ -2196,6 +2202,11 @@ del_mouse_termcode(
     if (n == KS_URXVT_MOUSE)
        has_mouse_termcode &= ~HMT_URXVT;
     else
+#   endif
+#   ifdef FEAT_MOUSE_GPM
+    if (n == KS_GPM_MOUSE)
+       has_mouse_termcode &= ~HMT_GPM;
+    else
 #   endif
     if (n == KS_SGR_MOUSE)
        has_mouse_termcode &= ~HMT_SGR;
index 2c49841ed9463f0f151c43ebc0fa5b2af59d9157..f41ca61328d55f7124a8608c8a51097ce72e4e05 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1323,
 /**/
     1322,
 /**/