diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-02 13:26:29 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-02 13:26:29 +0100 |
commit | cf2bb633978a3d2d5bba06611c95e15170662c15 (patch) | |
tree | d08fe428c78f2e0e92dcfe40ba8c1582cd53486b /src/testdir | |
parent | a02a8a4d849906ae100f46f23642b5f7d1bd314e (diff) |
patch 9.0.0357: 'linebreak' interferes with text property highlightv9.0.0357
Problem: 'linebreak' interferes with text property highlight if there is
syntax highlighting.
Solution: Check the text prop attributes after combining with syntax
attributes. (closes #11035)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/dumps/Test_prop_linebreak_1.dump (renamed from src/testdir/dumps/Test_prop_linebreak.dump) | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_prop_linebreak_2.dump | 10 | ||||
-rw-r--r-- | src/testdir/test_textprop.vim | 13 |
3 files changed, 22 insertions, 3 deletions
diff --git a/src/testdir/dumps/Test_prop_linebreak.dump b/src/testdir/dumps/Test_prop_linebreak_1.dump index 33be5b3122..c1a56e85e7 100644 --- a/src/testdir/dumps/Test_prop_linebreak.dump +++ b/src/testdir/dumps/Test_prop_linebreak_1.dump @@ -1,4 +1,4 @@ ->x+0&#ffffff0@49|]+0#ffffff16#e000002| +0#0000000#ffffff0@23 +>x+0&#ffffff0@49|]+0(ffff15| +0&#ffffff0@23 |x@69| @4 |~+0#4040ff13&| @73 |~| @73 diff --git a/src/testdir/dumps/Test_prop_linebreak_2.dump b/src/testdir/dumps/Test_prop_linebreak_2.dump new file mode 100644 index 0000000000..e705f71938 --- /dev/null +++ b/src/testdir/dumps/Test_prop_linebreak_2.dump @@ -0,0 +1,10 @@ +| +0#0000e05#a8a8a8255@1>x+0&#ffffff0@49|]+0(ffff15| +0#0000000#ffffff0@21 +| +0#0000e05#a8a8a8255@1|x+0&#ffffff0@69| +0#0000000&@2 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|1|,|1| @10|A|l@1| diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim index 03ae9c97e0..21d751fb14 100644 --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -1925,12 +1925,21 @@ func Test_prop_in_linebreak() let lines =<< trim END set breakindent linebreak breakat+=] call printf('%s]%s', repeat('x', 50), repeat('x', 70))->setline(1) - call prop_type_add('test', #{highlight: 'ErrorMsg'}) + call prop_type_add('test', #{highlight: 'MatchParen'}) call prop_add(1, 51, #{length: 1, type: 'test'}) + func AddMatch() + syntax on + syntax match xTest /.*/ + hi link xTest Comment + set signcolumn=yes + endfunc END call writefile(lines, 'XscriptPropLinebreak') let buf = RunVimInTerminal('-S XscriptPropLinebreak', #{rows: 10}) - call VerifyScreenDump(buf, 'Test_prop_linebreak', {}) + call VerifyScreenDump(buf, 'Test_prop_linebreak_1', {}) + + call term_sendkeys(buf, ":call AddMatch()\<CR>") + call VerifyScreenDump(buf, 'Test_prop_linebreak_2', {}) call StopVimInTerminal(buf) call delete('XscriptPropLinebreak') |