]> granicus.if.org Git - vim/commitdiff
patch 8.0.0110 v8.0.0110
authorBram Moolenaar <Bram@vim.org>
Thu, 1 Dec 2016 16:48:29 +0000 (17:48 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 1 Dec 2016 16:48:29 +0000 (17:48 +0100)
Problem:    Drop command doesn't use existing window.
Solution:   Check the window width properly. (Hirohito Higashi)

src/buffer.c
src/testdir/test_tabpage.vim
src/version.c

index e5d2dde2559ecbf1a3fd1ec1f54a9efcbd26450f..e77fc04976fa58929848c28e10944e397564b044 100644 (file)
@@ -4858,8 +4858,8 @@ do_arg_all(
            wpnext = wp->w_next;
            buf = wp->w_buffer;
            if (buf->b_ffname == NULL
-                   || (!keep_tabs && buf->b_nwindows > 1)
-                   || wp->w_width != Columns)
+                   || (!keep_tabs && (buf->b_nwindows > 1
+                           || wp->w_width != Columns)))
                i = opened_len;
            else
            {
index 3f69fb91937d43fff8acb12315de63a54406512a..1720107458687bfc599618f27dcdc471e9aa1d24 100644 (file)
@@ -65,6 +65,15 @@ function Test_tabpage()
     call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1)
     tabclose
     q
+    "
+    "
+    " Test for ":tab drop vertical-split-window" to jump test1 buffer
+    tabedit test1
+    vnew
+    tabfirst
+    tab drop test1
+    call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)])
+    1tabonly
   endif
   "
   "
index e234f86ab85f403684270207e7a087bdc7de9932..c9fc5727df9a5ed17395aed7f9e28d6555a98f69 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    110,
 /**/
     109,
 /**/