Mercurial > vim
diff src/testdir/test_textprop.vim @ 23901:6793853063e5 v8.2.2493
patch 8.2.2493: text property for text left of window shows up
Commit: https://github.com/vim/vim/commit/f3fa18468c0adc4fa645f7c394d7a6d14d3d4352
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 10 17:20:28 2021 +0100
patch 8.2.2493: text property for text left of window shows up
Problem: Text property for text left of window shows up.
Solution: Check if the text property ends before the current column.
(closes #7806)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 10 Feb 2021 17:30:03 +0100 |
parents | 9f692a75d481 |
children | a5478836fcb7 |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -1049,6 +1049,30 @@ func Test_textprop_after_tab() call delete('XtestPropTab') endfunc +func Test_textprop_nowrap_scrolled() + CheckScreendump + + let lines =<< trim END + vim9script + set nowrap + setline(1, 'The number 123 is smaller than 4567.' .. repeat('X', &columns)) + prop_type_add('number', {'highlight': 'ErrorMsg'}) + prop_add(1, 12, {'length': 3, 'type': 'number'}) + prop_add(1, 32, {'length': 4, 'type': 'number'}) + feedkeys('gg20zl', 'nxt') + END + call writefile(lines, 'XtestNowrap') + let buf = RunVimInTerminal('-S XtestNowrap', {'rows': 6}) + call VerifyScreenDump(buf, 'Test_textprop_nowrap_01', {}) + + call term_sendkeys(buf, "$") + call VerifyScreenDump(buf, 'Test_textprop_nowrap_02', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('XtestNowrap') +endfunc + func Test_textprop_with_syntax() CheckScreendump