To: vim_dev@googlegroups.com Subject: Patch 8.2.2560 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2560 Problem: Setting 'winminheigt' does not take tabline into account. Solution: Subtract the tabline from the available height. (closes #7899) Files: src/window.c, src/testdir/test_options.vim *** ../vim-8.2.2559/src/window.c 2021-02-07 12:12:39.373215432 +0100 --- src/window.c 2021-03-01 20:36:49.005959338 +0100 *************** *** 5860,5866 **** // loop until there is a 'winminheight' that is possible while (p_wmh > 0) { ! room = Rows - p_ch; needed = frame_minheight(topframe, NULL); if (room >= needed) break; --- 5860,5866 ---- // loop until there is a 'winminheight' that is possible while (p_wmh > 0) { ! room = Rows - p_ch - tabline_height(); needed = frame_minheight(topframe, NULL); if (room >= needed) break; *** ../vim-8.2.2559/src/testdir/test_options.vim 2021-02-02 21:09:57.966971269 +0100 --- src/testdir/test_options.vim 2021-03-01 20:35:27.874100146 +0100 *************** *** 1015,1020 **** --- 1015,1040 ---- set winheight& endfunc + func Test_opt_winminheight_term() + CheckRunVimInTerminal + + " The tabline should be taken into account. + let lines =<< trim END + set wmh=0 stal=2 + below sp | wincmd _ + below sp | wincmd _ + below sp | wincmd _ + below sp + END + call writefile(lines, 'Xwinminheight') + let buf = RunVimInTerminal('-S Xwinminheight', #{rows: 11}) + call term_sendkeys(buf, ":set wmh=1\n") + call WaitForAssert({-> assert_match('E36: Not enough room', term_getline(buf, 11))}) + + call StopVimInTerminal(buf) + call delete('Xwinminheight') + endfunc + " Test for the 'winminwidth' option func Test_opt_winminwidth() only! *** ../vim-8.2.2559/src/version.c 2021-02-28 23:13:36.368951782 +0100 --- src/version.c 2021-03-01 20:16:57.996103495 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2560, /**/ -- "I know that there are people who don't love their fellow man, and I hate those people!" - Tom Lehrer /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///