0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2019-10-16 14:51:39 +02:00
parent 3439028c89
commit 1142a31b8c
3 changed files with 16 additions and 2 deletions

View File

@@ -4046,8 +4046,8 @@ qf_goto_cwindow(qf_info_T *qi, int resize, int sz, int vertsplit)
if (sz != win->w_width) if (sz != win->w_width)
win_setwidth(sz); win_setwidth(sz);
} }
else if (sz != win->w_height else if (sz != win->w_height && win->w_height
&& win->w_height + win->w_status_height < cmdline_row) + win->w_status_height + tabline_height() < cmdline_row)
win_setheight(sz); win_setheight(sz);
} }

View File

@@ -297,6 +297,18 @@ func Test_copenHeight()
quit quit
endfunc 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 " Tests for the :cfile, :lfile, :caddfile, :laddfile, :cgetfile and :lgetfile
" commands. " commands.
func XfileTests(cchar) func XfileTests(cchar)

View File

@@ -753,6 +753,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2154,
/**/ /**/
2153, 2153,
/**/ /**/