Merge #11303 from janlazo/vim-8.1.1245

vim-patch:8.1.{1245,2154}
This commit is contained in:
Justin M. Keyes
2019-10-27 14:30:36 -07:00
committed by GitHub
2 changed files with 24 additions and 1 deletions

View File

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

View File

@@ -273,6 +273,27 @@ func Test_cwindow()
call XwindowTests('l')
endfunc
func Test_copenHeight()
copen
wincmd H
let height = winheight(0)
copen 10
call assert_equal(height, winheight(0))
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)