vim-patch:8.1.1245: ":copen 10" sets height in full-height window

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 vim/vim#4325)
36d502225c
This commit is contained in:
Jan Edmund Lazo 2019-10-27 11:28:13 -04:00
parent 479c014122
commit 7c26be61bb
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15
2 changed files with 11 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -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)