]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.1088: height of quickfix window not retained with vertical split v8.1.1088
authorBram Moolenaar <Bram@vim.org>
Sat, 30 Mar 2019 18:49:06 +0000 (19:49 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 30 Mar 2019 18:49:06 +0000 (19:49 +0100)
Problem:    Height of quickfix window not retained with vertical split.
Solution:   Use frame_fixed_height() and frame_fixed_width(). (Hongbo Liu,
            closes #4013, closes #2998)

src/testdir/test_winbuf_close.vim
src/version.c
src/window.c

index e4618610cd790e300c64a44db4ca16394cdcf35a..ee43540fddc6739d66ee0ef79dcda4d57d932050 100644 (file)
@@ -158,3 +158,29 @@ func Test_winfixwidth_on_close()
   %bwipeout!
   setlocal nowinfixwidth splitbelow& splitright&
 endfunction
+
+" Test that 'winfixheight' will be respected even there is non-leaf frame
+fun! Test_winfixheight_non_leaf_frame()
+  vsplit
+  botright 11new
+  let l:wid = win_getid()
+  setlocal winfixheight
+  call assert_equal(11, winheight(l:wid))
+  botright new
+  bwipe!
+  call assert_equal(11, winheight(l:wid))
+  %bwipe!
+endf
+
+" Test that 'winfixwidth' will be respected even there is non-leaf frame
+fun! Test_winfixwidth_non_leaf_frame()
+  split
+  topleft 11vnew
+  let l:wid = win_getid()
+  setlocal winfixwidth
+  call assert_equal(11, winwidth(l:wid))
+  topleft new
+  bwipe!
+  call assert_equal(11, winwidth(l:wid))
+  %bwipe!
+endf
index 6d1df32f750242bfd41f40ba7d5d14082e4f5e27..33616854acf89e62553d11a69ac6dcb791280188 100644 (file)
@@ -775,6 +775,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1088,
 /**/
     1087,
 /**/
index 6c9c7051b9005970cb535ad15840f5852b7af3ef..b905fbf3972830413612fea52a1459a8a4999a64 100644 (file)
@@ -2677,10 +2677,10 @@ winframe_remove(
            {
                if (frp != NULL)
                {
-                   if (frp->fr_win != NULL && !frp->fr_win->w_p_wfh)
+                   if (!frame_fixed_height(frp))
                    {
                        frp2 = frp;
-                       wp = frp->fr_win;
+                       wp = frame2win(frp2);
                        break;
                    }
                    frp = frp->fr_prev;
@@ -2714,10 +2714,10 @@ winframe_remove(
            {
                if (frp != NULL)
                {
-                   if (frp->fr_win != NULL && !frp->fr_win->w_p_wfw)
+                   if (!frame_fixed_width(frp))
                    {
                        frp2 = frp;
-                       wp = frp->fr_win;
+                       wp = frame2win(frp2);
                        break;
                    }
                    frp = frp->fr_prev;