diff src/ops.c @ 28869:6a4edacbd178 v8.2.4957

patch 8.2.4957: text properties in a wrong position after a block change Commit: https://github.com/vim/vim/commit/b559b302e0ecc6fced03d5201dc30f10cff7af0a Author: LemonBoy <thatlemon@gmail.com> Date: Sun May 15 13:08:02 2022 +0100 patch 8.2.4957: text properties in a wrong position after a block change Problem: Text properties in a wrong position after a block change. Solution: Adjust the properties columns. (closes https://github.com/vim/vim/issues/10427)
author Bram Moolenaar <Bram@vim.org>
date Sun, 15 May 2022 14:15:04 +0200
parents 948877671c54
children 6cdf55afaae9
line wrap: on
line diff
--- 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();