Mercurial > vim
diff src/testdir/test_textprop.vim @ 30749:6fe513996997 v9.0.0709
patch 9.0.0709: virtual text "after" not correct with 'nowrap'
Commit: https://github.com/vim/vim/commit/f167c7b42476f8ab5b32c3c5ccbdca914316e96b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 9 21:53:58 2022 +0100
patch 9.0.0709: virtual text "after" not correct with 'nowrap'
Problem: Virtual text "after" not correct with 'nowrap'.
Solution: Do not display "after" text prop on the next line when 'wrap' is
off.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 09 Oct 2022 23:00:03 +0200 |
parents | 11875afe85b2 |
children | b41ccaa6fd84 |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -3211,6 +3211,36 @@ func Test_long_text_below_with_padding() call StopVimInTerminal(buf) endfunc +func Test_text_after_nowrap() + CheckRunVimInTerminal + + " FIXME: the second property causes a hang + let lines =<< trim END + vim9script + setline(1, ['first line', 'second line '->repeat(50), 'third', 'fourth']) + set nowrap + prop_type_add('theprop', {highlight: 'DiffChange'}) + prop_add(1, 0, { + type: 'theprop', + text: 'after the text '->repeat(5), + text_align: 'after', + text_padding_left: 2, + }) + #prop_add(1, 0, { + # type: 'theprop', + # text: 'after the text '->repeat(5), + # text_align: 'after', + # text_padding_left: 2, + #}) + normal 2Gw + END + call writefile(lines, 'XTextAfterNowrap', 'D') + let buf = RunVimInTerminal('-S XTextAfterNowrap', #{rows: 8, cols: 60}) + call VerifyScreenDump(buf, 'Test_text_after_nowrap_1', {}) + + call StopVimInTerminal(buf) +endfunc + func Test_insert_text_change_arg() CheckRunVimInTerminal