]> granicus.if.org Git - vim/commitdiff
patch 8.0.1368: cannot drag status or separator of new terminal window v8.0.1368
authorBram Moolenaar <Bram@vim.org>
Tue, 5 Dec 2017 12:06:16 +0000 (13:06 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 5 Dec 2017 12:06:16 +0000 (13:06 +0100)
Problem:    Cannot drag status line or vertical separator of new terminal
            window. (UncleBill)
Solution:   Adjust mouse row and column computation. (Yasuhiro Matsumoto,
            closes #2410)

src/terminal.c
src/version.c

index 61630d5cce4bba9c3790b0b57a66e61222b95d71..5a2ebf8655ece282810b504d4990eec8d63fc941 100644 (file)
@@ -1308,12 +1308,13 @@ send_keys_to_term(term_T *term, int c, int typed)
        case K_MOUSELEFT:
        case K_MOUSERIGHT:
            if (mouse_row < W_WINROW(curwin)
-                   || mouse_row > (W_WINROW(curwin) + curwin->w_height)
+                   || mouse_row >= (W_WINROW(curwin) + curwin->w_height)
                    || mouse_col < curwin->w_wincol
-                   || mouse_col > W_ENDCOL(curwin)
+                   || mouse_col >= W_ENDCOL(curwin)
                    || dragging_outside)
            {
-               /* click or scroll outside the current window */
+               /* click or scroll outside the current window or on status line
+                * or vertical separator */
                if (typed)
                {
                    stuffcharReadbuff(c);
index c2445cef14947dc8b7a6adedc4c60a4a749791cf..76f4a5cfbf68d65c14c7bb68247c6dda44c63d23 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1368,
 /**/
     1367,
 /**/