To: vim_dev@googlegroups.com Subject: Patch 8.2.2595 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2595 Problem: Setting 'winminheight' may cause 'lines' to change. Solution: Also take minimal height of other tabpages into account. (#7899) Files: src/window.c, src/testdir/test_options.vim *** ../vim-8.2.2594/src/window.c 2021-03-01 21:02:42.686928992 +0100 --- src/window.c 2021-03-13 14:28:23.975641714 +0100 *************** *** 5860,5867 **** // 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; --p_wmh; --- 5860,5867 ---- // loop until there is a 'winminheight' that is possible while (p_wmh > 0) { ! room = Rows - p_ch; ! needed = min_rows() - 1; // 1 was added for the cmdline if (room >= needed) break; --p_wmh; *** ../vim-8.2.2594/src/testdir/test_options.vim 2021-03-01 21:02:42.686928992 +0100 --- src/testdir/test_options.vim 2021-03-13 14:26:12.123805687 +0100 *************** *** 1035,1040 **** --- 1035,1061 ---- call delete('Xwinminheight') endfunc + func Test_opt_winminheight_term_tabs() + CheckRunVimInTerminal + + " The tabline should be taken into account. + let lines =<< trim END + set wmh=0 stal=2 + split + split + split + split + tabnew + 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.2594/src/version.c 2021-03-13 13:52:29.813470884 +0100 --- src/version.c 2021-03-13 14:21:46.308061985 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2595, /**/ -- BEDEVERE: Why do you think she is a witch? SECOND VILLAGER: She turned me into a newt. BEDEVERE: A newt? SECOND VILLAGER: (After looking at himself for some time) I got better. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///