patch 9.0.0208: the override flag has no effect for virtual text
Problem: The override flag has no effect for virtual text. (Ben Jackson)
Solution: Make the override flag work. (closes #10915)
diff --git a/src/testdir/dumps/Test_prop_with_text_override_1.dump b/src/testdir/dumps/Test_prop_with_text_override_1.dump
new file mode 100644
index 0000000..50b8511
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_with_text_override_1.dump
@@ -0,0 +1,6 @@
+>s+8&#e0e0e08|o|m|e| | +8#4040ff13#40ffff15|i|n|s|e|r|t|e|d| |t+8#0000000#e0e0e08|e|x|t| |h|e|r|e| @35
+|~+0#4040ff13#ffffff0| @58
+|~| @58
+|~| @58
+|~| @58
+| +0#0000000&@41|1|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_with_text_override_2.dump b/src/testdir/dumps/Test_prop_with_text_override_2.dump
new file mode 100644
index 0000000..334929e
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_with_text_override_2.dump
@@ -0,0 +1,6 @@
+|s+0&#ffffff0|o|m+0&#e0e0e08|e| | +0#4040ff13#40ffff15|i|n|s|e|r|t|e|d| |t+0#0000000#e0e0e08|e|x|t| |h|e>r+0&#ffffff0|e| @35
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|~| @58
+|-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@19|1@1| @7|1|,|1|3|-|2|3| @6|A|l@1|
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 2e72db9..db17e79 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2805,6 +2805,30 @@
call delete('XscriptPropsBelowNowrap')
endfunc
+func Test_props_with_text_override()
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ vim9script
+ setline(1, 'some text here')
+ hi Likethis ctermfg=blue ctermbg=cyan
+ prop_type_add('prop', {highlight: 'Likethis', override: true})
+ prop_add(1, 6, {type: 'prop', text: ' inserted '})
+ hi CursorLine cterm=underline ctermbg=lightgrey
+ set cursorline
+ END
+ call writefile(lines, 'XscriptPropsOverride')
+ let buf = RunVimInTerminal('-S XscriptPropsOverride', #{rows: 6, cols: 60})
+ call VerifyScreenDump(buf, 'Test_prop_with_text_override_1', {})
+
+ call term_sendkeys(buf, ":set nocursorline\<CR>")
+ call term_sendkeys(buf, "0llvfr")
+ call VerifyScreenDump(buf, 'Test_prop_with_text_override_2', {})
+
+ call StopVimInTerminal(buf)
+ call delete('XscriptPropsOverride')
+endfunc
+
func Test_props_with_text_CursorMoved()
CheckRunVimInTerminal