diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-06-23 22:35:34 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-06-23 22:35:34 +0200 |
commit | 6d006f9e950364898240b7a6358516bbf73fe458 (patch) | |
tree | ec42ddc61ea1dc1edea789f7a8b29cc370283d0e /src | |
parent | f8be461d0284110b321be748fea206d4169b98bb (diff) | |
download | vim-6d006f9e950364898240b7a6358516bbf73fe458.zip |
patch 8.0.0664: mouse does not work in tmux
Problem: Mouse does not work in tmux. (lilydjwg)
Solution: Add flag for SGR release being present.
Diffstat (limited to 'src')
-rw-r--r-- | src/term.c | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c index d2a83874c..555300bac 100644 --- a/src/term.c +++ b/src/term.c @@ -1801,9 +1801,8 @@ set_termname(char_u *term) * The termcode for the mouse is added as a side effect in option.c. */ { - char_u *p; + char_u *p = (char_u *)""; - p = (char_u *)""; # ifdef FEAT_MOUSE_XTERM if (use_xterm_like_mouse(term)) { @@ -1944,6 +1943,7 @@ set_termname(char_u *term) # define HMT_PTERM 16 # define HMT_URXVT 32 # define HMT_SGR 64 +# define HMT_SGR_REL 128 static int has_mouse_termcode = 0; # endif @@ -1987,6 +1987,8 @@ set_mouse_termcode( # ifdef FEAT_MOUSE_SGR if (n == KS_SGR_MOUSE) has_mouse_termcode |= HMT_SGR; + else if (n == KS_SGR_MOUSE_RELEASE) + has_mouse_termcode |= HMT_SGR_REL; else # endif has_mouse_termcode |= HMT_NORMAL; @@ -2034,6 +2036,8 @@ del_mouse_termcode( # ifdef FEAT_MOUSE_SGR if (n == KS_SGR_MOUSE) has_mouse_termcode &= ~HMT_SGR; + else if (n == KS_SGR_MOUSE_RELEASE) + has_mouse_termcode &= ~HMT_SGR_REL; else # endif has_mouse_termcode &= ~HMT_NORMAL; diff --git a/src/version.c b/src/version.c index 102e3880d..5be7d50a6 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 664, +/**/ 663, /**/ 662, |