patch 9.0.0144: text property cannot override 'cursorline' highlight
Problem: Text property cannot override 'cursorline' highlight.
Solution: Add the "override" flag to prop_type_add(). (closes #5533,
closes #8225).
diff --git a/src/testdir/dumps/Test_textprop_hl_override_1.dump b/src/testdir/dumps/Test_textprop_hl_override_1.dump
new file mode 100644
index 0000000..ce447e7
--- /dev/null
+++ b/src/testdir/dumps/Test_textprop_hl_override_1.dump
@@ -0,0 +1,8 @@
+|O+0&#ffffff0|n|e| |o+0#4040ff13#ffff4012|n|e| |o+0#0000000#ffffff0|n|e| |o+0#4040ff13#ffff4012|n|e| |o+0#0000000#ffffff0|n|e| @55
+>T+10#ff404010#40ff4011|w|o| |t|w|o| |t|w|o| |t+10#4040ff13#ffff4012|w|o| |t+10#ff404010#40ff4011|w|o| @55
+|T+0#0000000#ffffff0|h|r|e|e+0#4040ff13#ffff4012| |t|h|r+0#0000000#ffffff0|e@1| |t+0#4040ff13#ffff4012|h|r|e|e+0#0000000#ffffff0| |t|h|r|e@1| @51
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|2|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_textprop_hl_override_2.dump b/src/testdir/dumps/Test_textprop_hl_override_2.dump
new file mode 100644
index 0000000..187233d
--- /dev/null
+++ b/src/testdir/dumps/Test_textprop_hl_override_2.dump
@@ -0,0 +1,8 @@
+|O+0&#ffffff0|n|e| |o+0#4040ff13#ffff4012|n|e| |o+0#0000000#ffffff0|n|e| |o+0#4040ff13#ffff4012|n|e| |o+0#0000000#ffffff0|n|e| @55
+|T|w|o| |t+0#4040ff13#ffff4012|w|o| |t+0#0000000#ffffff0|w|o| |t+0#4040ff13#ffff4012|w|o| |t+0#0000000#ffffff0|w|o| @55
+|T|h|r+0&#e0e0e08|e|e+0#4040ff13&| |t|h|r+0#0000000&|e@1| |t+0#4040ff13#ffff4012|h|r|e|e+0#0000000#e0e0e08| |t|h|r>e+0&#ffffff0@1| @51
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@34|2|0| @7|3|,|2@1| @9|A|l@1|
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 03af37a..4d41a15 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -1133,6 +1133,38 @@
call delete('XtestProp')
endfunc
+func Test_textprop_hl_override()
+ CheckScreendump
+
+ let lines =<< trim END
+ call setline(1, ['One one one one one', 'Two two two two two', 'Three three three three'])
+ hi OverProp ctermfg=blue ctermbg=yellow
+ hi CursorLine cterm=bold,underline ctermfg=red ctermbg=green
+ hi Vsual ctermfg=cyan ctermbg=grey
+ call prop_type_add('under', #{highlight: 'OverProp'})
+ call prop_type_add('over', #{highlight: 'OverProp', override: 1})
+ call prop_add(1, 5, #{type: 'under', length: 4})
+ call prop_add(1, 13, #{type: 'over', length: 4})
+ call prop_add(2, 5, #{type: 'under', length: 4})
+ call prop_add(2, 13, #{type: 'over', length: 4})
+ call prop_add(3, 5, #{type: 'under', length: 4})
+ call prop_add(3, 13, #{type: 'over', length: 4})
+ set cursorline
+ 2
+ END
+ call writefile(lines, 'XtestOverProp')
+ let buf = RunVimInTerminal('-S XtestOverProp', {'rows': 8})
+ call VerifyScreenDump(buf, 'Test_textprop_hl_override_1', {})
+
+ call term_sendkeys(buf, "3Gllv$hh")
+ call VerifyScreenDump(buf, 'Test_textprop_hl_override_2', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XtestOverProp')
+endfunc
+
func RunTestVisualBlock(width, dump)
call writefile([
\ "call setline(1, ["