patch 8.2.3684: blockwise insert does not handle autoindent properly
Problem: Blockwise insert does not handle autoindent properly.
Solution: Adjust text column for indent. (closes #9229)
diff --git a/src/ops.c b/src/ops.c
index d619064..354b2e2 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -1627,6 +1627,10 @@
--bd2.textlen;
}
bd.textcol = bd2.textcol;
+ if (did_indent && bd.textcol > ind_pre)
+ // If the insert was in the indent then include the indent
+ // change in the new text, otherwise don't.
+ bd.textcol += ind_post - ind_pre;
bd.textlen = bd2.textlen;
}