]> granicus.if.org Git - vim/commitdiff
patch 8.0.0664: mouse does not work in tmux v8.0.0664
authorBram Moolenaar <Bram@vim.org>
Fri, 23 Jun 2017 20:35:34 +0000 (22:35 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 23 Jun 2017 20:35:34 +0000 (22:35 +0200)
Problem:    Mouse does not work in tmux. (lilydjwg)
Solution:   Add flag for SGR release being present.

src/term.c
src/version.c

index d2a83874c00b02288382d70c859c21029175288f..555300bacf857eeae60bea21d9295076aa3eb92b 100644 (file)
@@ -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;
index 102e3880d2f0205018f87a15b028dbe2eb3750ae..5be7d50a63890ef5dd4df58e5e62b7043014b168 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    664,
 /**/
     663,
 /**/