summaryrefslogtreecommitdiffstats
path: root/src/ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ops.c b/src/ops.c
index f3588eb279..f3a26da44a 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -2194,7 +2194,8 @@ op_replace(oap, c)
{
/* This is slow, but it handles replacing a single-byte
* with a multi-byte and the other way around. */
- oap->end.col += (*mb_char2len)(c) - (*mb_char2len)(n);
+ if (curwin->w_cursor.lnum == oap->end.lnum)
+ oap->end.col += (*mb_char2len)(c) - (*mb_char2len)(n);
n = State;
State = REPLACE;
ins_char(c);