1
0
forked from aniani/vim

patch 8.1.1343: text properties not adjusted for Visual block mode delete

Problem:    Text properties not adjusted for Visual block mode delete.
Solution:   Call adjust_prop_columns(). (closes #4384)
This commit is contained in:
Bram Moolenaar
2019-05-17 22:57:26 +02:00
parent 787880a86d
commit 8055d17388
7 changed files with 109 additions and 10 deletions

View File

@@ -434,8 +434,15 @@ set_indent(
saved_cursor.col = (colnr_T)(s - newline);
}
#ifdef FEAT_TEXT_PROP
adjust_prop_columns(curwin->w_cursor.lnum, (colnr_T)(p - oldline),
ind_len - (colnr_T)(p - oldline));
{
int added = ind_len - (colnr_T)(p - oldline);
// When increasing indent this behaves like spaces were inserted at
// the old indent, when decreasing indent it behaves like spaces
// were deleted at the new indent.
adjust_prop_columns(curwin->w_cursor.lnum,
(colnr_T)(added > 0 ? (p - oldline) : ind_len), added);
}
#endif
retval = TRUE;
}