diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-11 21:38:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-11 21:38:58 +0200 |
commit | 5d0183b706c618bf043380f7e995987cde9e7d56 (patch) | |
tree | fbbcb7b4a3ec748763cac552903c8ccbf19ee283 /src/term.c | |
parent | 6e75e0a400d85cbcc27e2190ff448196bca025a8 (diff) | |
download | vim-git-5d0183b706c618bf043380f7e995987cde9e7d56.tar.gz |
patch 8.1.1323: 'mouse' option is reset when using GPM mousev8.1.1323
Problem: 'mouse' option is reset when using GPM mouse.
Solution: Add flag for GPM mouse.
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c index 29d402505..fb002ec81 100644 --- 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) |