Mercurial > vim
changeset 18319:4cc8a1a134fc v8.1.2154
patch 8.1.2154: quickfix window height wrong when there is a tabline
Commit: https://github.com/vim/vim/commit/1142a31b8c44c4e7dbf28a83ae52995113b37917
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 16 14:51:39 2019 +0200
patch 8.1.2154: quickfix window height wrong when there is a tabline
Problem: Quickfix window height wrong when there is a tabline. (Daniel
Hahler)
Solution: Take the tabline height into account. (closes #5058)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 16 Oct 2019 15:00:04 +0200 |
parents | 23e0dfe41d7a |
children | 4bea563fe277 |
files | src/quickfix.c src/testdir/test_quickfix.vim src/version.c |
diffstat | 3 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/quickfix.c +++ b/src/quickfix.c @@ -4046,8 +4046,8 @@ qf_goto_cwindow(qf_info_T *qi, int resiz 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); }
--- 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)