Skip to content

Commit 1142a31

Browse files
committed
patch 8.1.2154: quickfix window height wrong when there is a tabline
Problem: Quickfix window height wrong when there is a tabline. (Daniel Hahler) Solution: Take the tabline height into account. (closes #5058)
1 parent 3439028 commit 1142a31

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/quickfix.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4046,8 +4046,8 @@ qf_goto_cwindow(qf_info_T *qi, int resize, int sz, int vertsplit)
40464046
if (sz != win->w_width)
40474047
win_setwidth(sz);
40484048
}
4049-
else if (sz != win->w_height
4050-
&& win->w_height + win->w_status_height < cmdline_row)
4049+
else if (sz != win->w_height && win->w_height
4050+
+ win->w_status_height + tabline_height() < cmdline_row)
40514051
win_setheight(sz);
40524052
}
40534053

src/testdir/test_quickfix.vim

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,18 @@ func Test_copenHeight()
297297
quit
298298
endfunc
299299

300+
func Test_copenHeight_tabline()
301+
set tabline=foo showtabline=2
302+
copen
303+
wincmd H
304+
let height = winheight(0)
305+
copen 10
306+
call assert_equal(height, winheight(0))
307+
quit
308+
set tabline& showtabline&
309+
endfunc
310+
311+
300312
" Tests for the :cfile, :lfile, :caddfile, :laddfile, :cgetfile and :lgetfile
301313
" commands.
302314
func XfileTests(cchar)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,8 @@ static char *(features[]) =
753753

754754
static int included_patches[] =
755755
{ /* Add new patch number below this line */
756+
/**/
757+
2154,
756758
/**/
757759
2153,
758760
/**/

0 commit comments

Comments
 (0)