vim-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 vim/vim#5058)
1142a31b8c
This commit is contained in:
Jan Edmund Lazo 2019-10-27 11:31:38 -04:00
parent 7c26be61bb
commit 0f7a645f54
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15
2 changed files with 14 additions and 1 deletions

View File

@ -3165,7 +3165,8 @@ static int qf_goto_cwindow(const qf_info_T *qi, bool resize, int sz,
win_setwidth(sz);
}
} else if (sz != win->w_height
&& win->w_height + win->w_status_height < cmdline_row) {
&& (win->w_height + win->w_status_height + tabline_height()
< cmdline_row)) {
win_setheight(sz);
}
}

View File

@ -282,6 +282,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)