]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.1245: ":copen 10" sets height in full-height window v8.1.1245
authorBram Moolenaar <Bram@vim.org>
Thu, 2 May 2019 18:17:40 +0000 (20:17 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 2 May 2019 18:17:40 +0000 (20:17 +0200)
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)

src/quickfix.c
src/testdir/test_quickfix.vim
src/version.c

index cbef377c90346ad71e14717e080d6f5bee5e45c4..f90934387938e90498c5a063cf71908d498a6c09 100644 (file)
@@ -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);
     }
 
index 6099dcf34ef911e87cdbe1723ffddeeaf09bbba5..ccd7778e42151e7c1af50d637bd1350b498231dc 100644 (file)
@@ -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)
index 30b94f3fda553cba808843dbff4d0c48599c7880..96f64eb8d9cb6d07aba7069b4b8c81c05bae1521 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1245,
 /**/
     1244,
 /**/