summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2022-05-15 13:08:02 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-15 13:08:02 +0100
commitb559b302e0ecc6fced03d5201dc30f10cff7af0a (patch)
tree4b42965e1ce1153a1ec471de9c7e4dcef442e920 /src/ops.c
parent395bd1f6d3edc9f7edb5d1f2d7deaf5a9e3ab93c (diff)
downloadvim-git-b559b302e0ecc6fced03d5201dc30f10cff7af0a.tar.gz
patch 8.2.4957: text properties in a wrong position after a block changev8.2.4957
Problem: Text properties in a wrong position after a block change. Solution: Adjust the properties columns. (closes #10427)
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ops.c b/src/ops.c
index b11cbf541..5b4c2957b 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -1814,6 +1814,12 @@ op_change(oparg_T *oap)
oldp += bd.textcol;
STRMOVE(newp + offset, oldp);
ml_replace(linenr, newp, FALSE);
+#ifdef FEAT_PROP_POPUP
+ // Shift the properties for linenr as edit() would do.
+ if (curbuf->b_has_textprop)
+ adjust_prop_columns(linenr, bd.textcol,
+ vpos.coladd + ins_len, 0);
+#endif
}
}
check_cursor();