Created
February 28, 2013 05:43
-
-
Save mattn/5054510 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 8b86b69546a9 src/ops.c | |
--- a/src/ops.c Wed Feb 20 21:26:00 2013 +0100 | |
+++ b/src/ops.c Thu Feb 28 14:41:31 2013 +0900 | |
@@ -2194,7 +2194,9 @@ | |
{ | |
/* 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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment