]> granicus.if.org Git - vim/commitdiff
patch 7.4.857 v7.4.857
authorBram Moolenaar <Bram@vim.org>
Tue, 8 Sep 2015 15:50:41 +0000 (17:50 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 8 Sep 2015 15:50:41 +0000 (17:50 +0200)
Problem:    Dragging the current tab with the mouse doesn't work properly.
Solution:   Take the current tabpage index into account. (Hirohito Higashi)

src/normal.c
src/version.c

index ae7b83ad2278f80c30889c6bdc45f0ddc842efa1..69b0dcecbed5b601782d1a2780bb1093e3c6ad33 100644 (file)
@@ -2561,7 +2561,8 @@ do_mouse(oap, c, dir, count, fixindent)
            if (in_tab_line)
            {
                c1 = TabPageIdxs[mouse_col];
-               tabpage_move(c1 <= 0 ? 9999 : c1 - 1);
+               tabpage_move(c1 <= 0 ? 9999 : c1 < tabpage_index(curtab)
+                                                               ? c1 - 1 : c1);
            }
            return FALSE;
        }
index a3b567ef83a6eab03fec61553418eed49f9aa3ce..3fb4ad2fe2fb62b4a1674e76951caba7669ac516 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    857,
 /**/
     856,
 /**/