patch 9.0.0357: 'linebreak' interferes with text property highlight
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)
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 03ae9c9..21d751f 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -1925,12 +1925,21 @@
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')