aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/quickfix.c3
-rw-r--r--src/nvim/testdir/test_quickfix.vim9
2 files changed, 11 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 8f891751d6..d900ea3c70 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -3164,7 +3164,8 @@ 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 < cmdline_row) {
win_setheight(sz);
}
}
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 6f58b0084c..2eb20e61bd 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -273,6 +273,15 @@ 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
+
" Tests for the :cfile, :lfile, :caddfile, :laddfile, :cgetfile and :lgetfile
" commands.
func XfileTests(cchar)