Mercurial > vim
diff src/testdir/test_textprop.vim @ 29633:e80174903fdf v9.0.0157
patch 9.0.0157: 'showbreak' displayed below truncated "after" text prop
Commit: https://github.com/vim/vim/commit/cba6952e3499f85545c274873c67bb843d3f3518
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 6 21:03:53 2022 +0100
patch 9.0.0157: 'showbreak' displayed below truncated "after" text prop
Problem: 'showbreak' displayed below truncated "after" text prop.
Solution: Suppress 'showbreak' when "after" prop doesn't wrap.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 06 Aug 2022 22:15:06 +0200 |
parents | 2f5610696bcd |
children | 592818fd3110 |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2336,6 +2336,35 @@ func Test_props_with_text_after() call delete('XscriptPropsWithTextAfter') endfunc +func Test_props_with_text_after_below_trunc() + CheckRunVimInTerminal + + let lines =<< trim END + vim9script + edit foobar + set showbreak=+++ + setline(1, ['onasdf asdf asdf asdf asd fas df', 'two']) + prop_type_add('test', {highlight: 'Special'}) + prop_add(1, 0, { + type: 'test', + text: 'the quick brown fox jumps over the lazy dog', + text_align: 'after' + }) + prop_add(1, 0, { + type: 'test', + text: 'the quick brown fox jumps over the lazy dog', + text_align: 'below' + }) + normal G$ + END + call writefile(lines, 'XscriptPropsAfterTrunc') + let buf = RunVimInTerminal('-S XscriptPropsAfterTrunc', #{rows: 8, cols: 60}) + call VerifyScreenDump(buf, 'Test_prop_with_text_after_below_trunc_1', {}) + + call StopVimInTerminal(buf) + call delete('XscriptPropsAfterTrunc') +endfunc + func Test_props_with_text_after_joined() CheckRunVimInTerminal