diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/quickfix.c | 3 | ||||
-rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index d900ea3c70..4ca9ca2a3e 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -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); } } diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 2eb20e61bd..31b0c0cd2c 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -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) |