patch 8.2.4960: text properties that cross lines not updated for deleted line
Problem: Text properties that cross line boundary are not correctly updated
for a deleted line.
Solution: Correct computing location of text property entry. (Paul Ollis,
closes #10431, closes #10430)
diff --git a/src/memline.c b/src/memline.c
index e098aef..2cdd227 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -3501,8 +3501,9 @@
#ifdef FEAT_PROP_POPUP
/*
* Adjust text properties in line "lnum" for a deleted line.
- * When "above" is true this is the line above the deleted line.
- * "del_props" are the properties of the deleted line.
+ * When "above" is true this is the line above the deleted line, otherwise this
+ * is the line below the deleted line.
+ * "del_props[del_props_len]" are the properties of the deleted line.
*/
static void
adjust_text_props_for_delete(
@@ -3569,7 +3570,7 @@
: TP_FLAG_CONT_PREV;
textprop_T prop_this;
- mch_memmove(&prop_this, text + textlen + done_del,
+ mch_memmove(&prop_this, text + textlen + done_this,
sizeof(textprop_T));
if ((prop_this.tp_flags & flag)
&& prop_del.tp_id == prop_this.tp_id
@@ -3577,7 +3578,7 @@
{
found = TRUE;
prop_this.tp_flags &= ~flag;
- mch_memmove(text + textlen + done_del, &prop_this,
+ mch_memmove(text + textlen + done_this, &prop_this,
sizeof(textprop_T));
break;
}