summaryrefslogtreecommitdiffstats
path: root/src/memline.c
diff options
context:
space:
mode:
authorPaul Ollis <paul@cleversheep.org>2022-05-15 22:24:55 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-15 22:24:55 +0100
commit1bdc60eb91b9e6320318d96ea59bd2aad775f408 (patch)
tree5c54b96ff706bfd467b103c0fabb9cbc845a8b6f /src/memline.c
parentb62dc5e7825bc195efe3041d5b3a9f1528359e1c (diff)
patch 8.2.4960: text properties that cross lines not updated for deleted linev8.2.4960
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)
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/memline.c b/src/memline.c
index e098aef552..2cdd2277dc 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -3501,8 +3501,9 @@ ml_replace_len(
#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 @@ adjust_text_props_for_delete(
: 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 @@ adjust_text_props_for_delete(
{
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;
}