Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
28810:b8850d9e3e6e | 28811:bd5b6ac5998f |
---|---|
467 let &statusline = '%#StatColorHi2#%(✓%#StatColorHi2#%) Q≡' | 467 let &statusline = '%#StatColorHi2#%(✓%#StatColorHi2#%) Q≡' |
468 END | 468 END |
469 call writefile(lines, 'XTest_statusline') | 469 call writefile(lines, 'XTest_statusline') |
470 | 470 |
471 let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 10, 'cols': 50}) | 471 let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 10, 'cols': 50}) |
472 call TermWait(buf, 50) | |
473 call VerifyScreenDump(buf, 'Test_statusline_1', {}) | 472 call VerifyScreenDump(buf, 'Test_statusline_1', {}) |
474 | 473 |
475 " clean up | 474 " clean up |
476 call StopVimInTerminal(buf) | 475 call StopVimInTerminal(buf) |
477 call delete('XTest_statusline') | 476 call delete('XTest_statusline') |
539 set previewwindow | 538 set previewwindow |
540 redraw | 539 redraw |
541 bwipe! | 540 bwipe! |
542 endfunc | 541 endfunc |
543 | 542 |
543 func Test_statusline_highlight_truncate() | |
544 CheckScreendump | |
545 | |
546 let lines =<< trim END | |
547 set laststatus=2 | |
548 hi! link User1 Directory | |
549 hi! link User2 ErrorMsg | |
550 set statusline=%.5(%1*ABC%2*DEF%1*GHI%) | |
551 END | |
552 call writefile(lines, 'XTest_statusline') | |
553 | |
554 let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6}) | |
555 call VerifyScreenDump(buf, 'Test_statusline_hl', {}) | |
556 | |
557 call StopVimInTerminal(buf) | |
558 call delete('XTest_statusline') | |
559 endfunc | |
560 | |
544 " vim: shiftwidth=2 sts=2 expandtab | 561 " vim: shiftwidth=2 sts=2 expandtab |