summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-02 20:17:40 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-02 20:17:40 +0200
commit36d502225c3ec5e8b30771d58ee20171ce564b2f (patch)
tree60c386bb96f1c88b50cdeea1858a8cdf65106c0e
parent1ee36d6ff5bc51a1ecb5631c3e5bb632b5d1bcfc (diff)
downloadvim-git-36d502225c3ec5e8b30771d58ee20171ce564b2f.tar.gz
patch 8.1.1245: ":copen 10" sets height in full-height windowv8.1.1245
Problem: ":copen 10" sets height in full-height window. (Daniel Hahler) Solution: Don't set the height if the quickfix window is full height. (closes #4325)
-rw-r--r--src/quickfix.c3
-rw-r--r--src/testdir/test_quickfix.vim9
-rw-r--r--src/version.c2
3 files changed, 13 insertions, 1 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index cbef377c9..f90934387 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4016,7 +4016,8 @@ qf_goto_cwindow(qf_info_T *qi, int resize, int sz, int vertsplit)
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/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index 6099dcf34..ccd7778e4 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -279,6 +279,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)
diff --git a/src/version.c b/src/version.c
index 30b94f3fd..96f64eb8d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -768,6 +768,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1245,
+/**/
1244,
/**/
1243,