]> granicus.if.org Git - vim/commitdiff
patch 8.1.2154: quickfix window height wrong when there is a tabline v8.1.2154
authorBram Moolenaar <Bram@vim.org>
Wed, 16 Oct 2019 12:51:39 +0000 (14:51 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 16 Oct 2019 12:51:39 +0000 (14:51 +0200)
Problem:    Quickfix window height wrong when there is a tabline. (Daniel
            Hahler)
Solution:   Take the tabline height into account. (closes #5058)

src/quickfix.c
src/testdir/test_quickfix.vim
src/version.c

index 136c472e1895df996790c426bd047d0cd467a606..36456ed4ffdf96b4fde904fe1f8aa606bcec6d8e 100644 (file)
@@ -4046,8 +4046,8 @@ qf_goto_cwindow(qf_info_T *qi, int resize, int sz, int vertsplit)
            if (sz != win->w_width)
                win_setwidth(sz);
        }
-       else if (sz != win->w_height
-                        && win->w_height + win->w_status_height < cmdline_row)
+       else if (sz != win->w_height && win->w_height
+                      + win->w_status_height + tabline_height() < cmdline_row)
            win_setheight(sz);
     }
 
index e0ab2b3aa2a3691e599c26d5f29b2b35e9de934a..84cdb6c916aea747cbe357d0623f0f61b52a2e29 100644 (file)
@@ -297,6 +297,18 @@ func Test_copenHeight()
   quit
 endfunc
 
+func Test_copenHeight_tabline()
+  set tabline=foo showtabline=2
+  copen
+  wincmd H
+  let height = winheight(0)
+  copen 10
+  call assert_equal(height, winheight(0))
+  quit
+  set tabline& showtabline&
+endfunc
+
+
 " Tests for the :cfile, :lfile, :caddfile, :laddfile, :cgetfile and :lgetfile
 " commands.
 func XfileTests(cchar)
index 33929149dc477a48c0ec3bca3f868a772686a1ca..165756a298f385e0ee4405acc7e51a24eea26f73 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2154,
 /**/
     2153,
 /**/