summaryrefslogtreecommitdiff
path: root/src/textprop.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-24 12:24:37 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-24 12:24:37 +0100
commitf5240b96f721b08d703340ff0b2e67b79fb8b821 (patch)
treeca491551437d156bb26b70f947fcb8fa091f541e /src/textprop.c
parent762df0477c32065498805e09c15adc468a6cc8ea (diff)
downloadvim-git-f5240b96f721b08d703340ff0b2e67b79fb8b821.tar.gz
patch 9.0.0252: cursor in wrong place after virtual textv9.0.0252
Problem: Cursor in wrong place after virtual text. Solution: Do not change the length of a virtual text property. (closes #10964)
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 31e1be3bb..0ba5c20b3 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -2127,7 +2127,8 @@ adjust_prop(
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);