diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-10-16 14:51:39 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-10-16 14:51:39 +0200 |
commit | 1142a31b8c44c4e7dbf28a83ae52995113b37917 (patch) | |
tree | ec74e12a71816acfceab658696ce4bb12484ff79 | |
parent | 3439028c8909aaa71ffe612a7191babdfe07c04c (diff) |
patch 8.1.2154: quickfix window height wrong when there is a tablinev8.1.2154
Problem: Quickfix window height wrong when there is a tabline. (Daniel
Hahler)
Solution: Take the tabline height into account. (closes #5058)
-rw-r--r-- | src/quickfix.c | 4 | ||||
-rw-r--r-- | src/testdir/test_quickfix.vim | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 16 insertions, 2 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index 136c472e18..36456ed4ff 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -4046,8 +4046,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 - && win->w_height + win->w_status_height < cmdline_row) + else if (sz != win->w_height && win->w_height + + win->w_status_height + tabline_height() < cmdline_row) win_setheight(sz); } diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim index e0ab2b3aa2..84cdb6c916 100644 --- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -297,6 +297,18 @@ func Test_copenHeight() 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) diff --git a/src/version.c b/src/version.c index 33929149dc..165756a298 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2154, +/**/ 2153, /**/ 2152, |