--- /dev/null
+>S+0&#ffffff0|e|t|E|r@1|o|r|C|o|d|e|(| |i+0&#ffd7ff255|d|:|-+0#4040ff13#ffffff0|1+0#0000000&|0|,| |i+0&#ffd7ff255|d|:|-+0#4040ff13#ffffff0|2+0#0000000&|0| |)| @29
+|s|e|c|o|n|d| |l|i|n|e| @48
+|~+0#4040ff13&| @58
+|~| @58
+| +0#0000000&@41|1|,|1| @10|A|l@1|
--- /dev/null
+|S+0&#ffffff0|e|t|E|r@1|o|r|C|o|d|e|(| |i+0&#ffd7ff255|d|:|-+0#4040ff13#ffffff0|1+0#0000000&|2|3>4|,| |i+0&#ffd7ff255|d|:|-+0#4040ff13#ffffff0|2+0#0000000&|0| |)| @27
+|s|e|c|o|n|d| |l|i|n|e| @48
+|~+0#4040ff13&| @58
+|~| @58
+| +0#0000000&@41|1|,|1|8|-|2@1| @6|A|l@1|
call delete('XscriptPropsPadded')
endfunc
+func Test_insert_text_change_arg()
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ vim9script
+ setline(1, ['SetErrorCode( 10, 20 )', 'second line'])
+ prop_type_add('param', {highlight: 'DiffChange', start_incl: 1})
+ prop_type_add('padd', {highlight: 'NonText', start_incl: 1})
+ prop_add(1, 15, {
+ type: 'param',
+ text: 'id:',
+ })
+ prop_add(1, 15, {
+ type: 'padd',
+ text: '-',
+ })
+ prop_add(1, 19, {
+ type: 'param',
+ text: 'id:',
+ })
+ prop_add(1, 19, {
+ type: 'padd',
+ text: '-',
+ })
+ END
+ call writefile(lines, 'XscriptPropsChange')
+ let buf = RunVimInTerminal('-S XscriptPropsChange', #{rows: 5, cols: 60})
+ call VerifyScreenDump(buf, 'Test_prop_text_change_arg_1', {})
+
+ call term_sendkeys(buf, "ggf1cw1234\<Esc>")
+ call VerifyScreenDump(buf, 'Test_prop_text_change_arg_2', {})
+
+ call StopVimInTerminal(buf)
+ call delete('XscriptPropsChange')
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
else
prop->tp_col += added;
}
- else if (prop->tp_len > 0 && prop->tp_col + prop->tp_len > col)
+ else if (prop->tp_len > 0 && prop->tp_col + prop->tp_len > col
+ && prop->tp_id >= 0) // don't change length for virtual text
{
int after = col - added - (prop->tp_col - 1 + prop->tp_len);