# HG changeset patch # User Bram Moolenaar # Date 1557603904 -7200 # Node ID e73daa5741d16971d4f4e5436875d8639a0e0429 # Parent f9145e89098fdd02b865fb79556b0a49a46c5fc2 patch 8.1.1323: 'mouse' option is reset when using GPM mouse commit https://github.com/vim/vim/commit/5d0183b706c618bf043380f7e995987cde9e7d56 Author: Bram Moolenaar 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. diff --git a/src/term.c b/src/term.c --- 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) diff --git a/src/version.c b/src/version.c --- 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,