diff options
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index cbfed5daa5..ceb0049761 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -2311,6 +2311,13 @@ void op_insert(oparg_T *oap, long count1) } } bd.textcol = bd2.textcol; + /* + * If the insert was in the indent then include the indent + * change in the new text, otherwise don't. + */ + if (did_indent && bd.textcol > ind_pre) { + bd.textcol += ind_post - ind_pre; + } bd.textlen = bd2.textlen; } |