aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-10-27 14:30:36 -0700
committerGitHub <noreply@github.com>2019-10-27 14:30:36 -0700
commitfdd243bf3b4e04133cddf6bdadb2623476f90416 (patch)
treebe5b6db1330981dc9de6d071a19bcb6b1584fa0d /src
parent31536ae003c0bd0ee311fc97b26ded0db8b3fa34 (diff)
parent0f7a645f544cb02d6a48749a5f60f8c43e89fd3d (diff)
downloadrneovim-fdd243bf3b4e04133cddf6bdadb2623476f90416.tar.gz
rneovim-fdd243bf3b4e04133cddf6bdadb2623476f90416.tar.bz2
rneovim-fdd243bf3b4e04133cddf6bdadb2623476f90416.zip
Merge #11303 from janlazo/vim-8.1.1245
vim-patch:8.1.{1245,2154}
Diffstat (limited to 'src')
-rw-r--r--src/nvim/quickfix.c4
-rw-r--r--src/nvim/testdir/test_quickfix.vim21
2 files changed, 24 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 8f891751d6..4ca9ca2a3e 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -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);
}
}
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 6f58b0084c..31b0c0cd2c 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -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)