summaryrefslogtreecommitdiff
path: root/src/testdir/test_statusline.vim
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2022-05-09 21:03:47 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-09 21:03:47 +0100
commit57ff52677bf5ba1651281ffe40505df8feba4a36 (patch)
tree3c657ec985fabf158175925c607f507221de4ef9 /src/testdir/test_statusline.vim
parent6ed545e79735f23ff8e650bc2f0967e5a0baedc9 (diff)
downloadvim-git-57ff52677bf5ba1651281ffe40505df8feba4a36.tar.gz
patch 8.2.4929: off-by-one error in in statusline itemv8.2.4929
Problem: Off-by-one error in in statusline item. Solution: Subtrace one less. (closes #10394, closes #5599)
Diffstat (limited to 'src/testdir/test_statusline.vim')
-rw-r--r--src/testdir/test_statusline.vim19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/testdir/test_statusline.vim b/src/testdir/test_statusline.vim
index eaf152593..7c75f61a8 100644
--- 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