Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
23900:fa6db32856ac | 23901:6793853063e5 |
---|---|
1047 " clean up | 1047 " clean up |
1048 call StopVimInTerminal(buf) | 1048 call StopVimInTerminal(buf) |
1049 call delete('XtestPropTab') | 1049 call delete('XtestPropTab') |
1050 endfunc | 1050 endfunc |
1051 | 1051 |
1052 func Test_textprop_nowrap_scrolled() | |
1053 CheckScreendump | |
1054 | |
1055 let lines =<< trim END | |
1056 vim9script | |
1057 set nowrap | |
1058 setline(1, 'The number 123 is smaller than 4567.' .. repeat('X', &columns)) | |
1059 prop_type_add('number', {'highlight': 'ErrorMsg'}) | |
1060 prop_add(1, 12, {'length': 3, 'type': 'number'}) | |
1061 prop_add(1, 32, {'length': 4, 'type': 'number'}) | |
1062 feedkeys('gg20zl', 'nxt') | |
1063 END | |
1064 call writefile(lines, 'XtestNowrap') | |
1065 let buf = RunVimInTerminal('-S XtestNowrap', {'rows': 6}) | |
1066 call VerifyScreenDump(buf, 'Test_textprop_nowrap_01', {}) | |
1067 | |
1068 call term_sendkeys(buf, "$") | |
1069 call VerifyScreenDump(buf, 'Test_textprop_nowrap_02', {}) | |
1070 | |
1071 " clean up | |
1072 call StopVimInTerminal(buf) | |
1073 call delete('XtestNowrap') | |
1074 endfunc | |
1075 | |
1052 func Test_textprop_with_syntax() | 1076 func Test_textprop_with_syntax() |
1053 CheckScreendump | 1077 CheckScreendump |
1054 | 1078 |
1055 let lines =<< trim END | 1079 let lines =<< trim END |
1056 call setline(1, [ | 1080 call setline(1, [ |