changeset 16642:e73daa5741d1 v8.1.1323

patch 8.1.1323: 'mouse' option is reset when using GPM mouse commit https://github.com/vim/vim/commit/5d0183b706c618bf043380f7e995987cde9e7d56 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 11 21:38:58 2019 +0200 patch 8.1.1323: 'mouse' option is reset when using GPM mouse Problem: 'mouse' option is reset when using GPM mouse. Solution: Add flag for GPM mouse.
author Bram Moolenaar <Bram@vim.org>
date Sat, 11 May 2019 21:45:04 +0200
parents f9145e89098f
children da388fbda840
files src/term.c src/version.c
diffstat 2 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c
+++ b/src/term.c
@@ -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
 
@@ -2150,6 +2151,11 @@ set_mouse_termcode(
 	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;
     else if (n == KS_SGR_MOUSE_RELEASE)
@@ -2197,6 +2203,11 @@ del_mouse_termcode(
 	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;
     else if (n == KS_SGR_MOUSE_RELEASE)
--- a/src/version.c
+++ b/src/version.c
@@ -768,6 +768,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1323,
+/**/
     1322,
 /**/
     1321,