0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2022-08-24 12:24:37 +01:00
parent 762df0477c
commit f5240b96f7
5 changed files with 50 additions and 1 deletions

View File

@@ -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);