mirror of
https://github.com/vim/vim.git
synced 2025-10-17 07:44:28 -04:00
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)
This commit is contained in:
committed by
Bram Moolenaar
parent
b62dc5e782
commit
1bdc60eb91
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user