Mercurial > vim
diff src/testdir/test_statusline.vim @ 28811:bd5b6ac5998f v8.2.4929
patch 8.2.4929: off-by-one error in in statusline item
Commit: https://github.com/vim/vim/commit/57ff52677bf5ba1651281ffe40505df8feba4a36
Author: LemonBoy <thatlemon@gmail.com>
Date: Mon May 9 21:03:47 2022 +0100
patch 8.2.4929: off-by-one error in in statusline item
Problem: Off-by-one error in in statusline item.
Solution: Subtrace one less. (closes https://github.com/vim/vim/issues/10394, closes https://github.com/vim/vim/issues/5599)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 09 May 2022 22:15:03 +0200 |
parents | b4c111ea83b1 |
children | 5da38c4ffe92 |
line wrap: on
line diff
--- a/src/testdir/test_statusline.vim +++ b/src/testdir/test_statusline.vim @@ -469,7 +469,6 @@ func Test_statusline_removed_group() call writefile(lines, 'XTest_statusline') let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 10, 'cols': 50}) - call TermWait(buf, 50) call VerifyScreenDump(buf, 'Test_statusline_1', {}) " clean up @@ -541,4 +540,22 @@ func Test_statusline_verylong_filename() bwipe! endfunc +func Test_statusline_highlight_truncate() + CheckScreendump + + let lines =<< trim END + set laststatus=2 + hi! link User1 Directory + hi! link User2 ErrorMsg + set statusline=%.5(%1*ABC%2*DEF%1*GHI%) + END + call writefile(lines, 'XTest_statusline') + + let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6}) + call VerifyScreenDump(buf, 'Test_statusline_hl', {}) + + call StopVimInTerminal(buf) + call delete('XTest_statusline') +endfunc + " vim: shiftwidth=2 sts=2 expandtab