patch 9.0.0252: cursor in wrong place after virtual text
Problem: Cursor in wrong place after virtual text.
Solution: Do not change the length of a virtual text property.
(closes #10964)
diff --git a/src/textprop.c b/src/textprop.c
index 31e1be3..0ba5c20 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -2127,7 +2127,8 @@
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);