Mercurial > vim
comparison src/testdir/test_options.vim @ 24037:b5a6de6a8915 v8.2.2560
patch 8.2.2560: setting 'winminheigt' does not take tabline into account
Commit: https://github.com/vim/vim/commit/39d4cab494248131b6fb07aba633aa4da7871a57
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 1 21:02:46 2021 +0100
patch 8.2.2560: setting 'winminheigt' does not take tabline into account
Problem: Setting 'winminheigt' does not take tabline into account.
Solution: Subtract the tabline from the available height. (closes https://github.com/vim/vim/issues/7899)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 01 Mar 2021 21:15:03 +0100 |
parents | bfc1ae959d9d |
children | 0a5eba7e6660 |
comparison
equal
deleted
inserted
replaced
24036:cb3227f4d7a8 | 24037:b5a6de6a8915 |
---|---|
1013 call assert_true(&winminheight <= &lines) | 1013 call assert_true(&winminheight <= &lines) |
1014 set winminheight& | 1014 set winminheight& |
1015 set winheight& | 1015 set winheight& |
1016 endfunc | 1016 endfunc |
1017 | 1017 |
1018 func Test_opt_winminheight_term() | |
1019 CheckRunVimInTerminal | |
1020 | |
1021 " The tabline should be taken into account. | |
1022 let lines =<< trim END | |
1023 set wmh=0 stal=2 | |
1024 below sp | wincmd _ | |
1025 below sp | wincmd _ | |
1026 below sp | wincmd _ | |
1027 below sp | |
1028 END | |
1029 call writefile(lines, 'Xwinminheight') | |
1030 let buf = RunVimInTerminal('-S Xwinminheight', #{rows: 11}) | |
1031 call term_sendkeys(buf, ":set wmh=1\n") | |
1032 call WaitForAssert({-> assert_match('E36: Not enough room', term_getline(buf, 11))}) | |
1033 | |
1034 call StopVimInTerminal(buf) | |
1035 call delete('Xwinminheight') | |
1036 endfunc | |
1037 | |
1018 " Test for the 'winminwidth' option | 1038 " Test for the 'winminwidth' option |
1019 func Test_opt_winminwidth() | 1039 func Test_opt_winminwidth() |
1020 only! | 1040 only! |
1021 let &winwidth = &columns + 4 | 1041 let &winwidth = &columns + 4 |
1022 call assert_fails('let &winminwidth = &columns + 2', 'E36:') | 1042 call assert_fails('let &winminwidth = &columns + 2', 'E36:') |