Mercurial > vim
diff src/ops.c @ 4203:eea32254940f v7.3.853
updated for version 7.3.853
Problem: Using "ra" in multiple lines on multi-byte characters leaves a few
characters not replaced.
Solution: Adjust the end column only in the last line. (Yasuhiro Matsumoto)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 07 Mar 2013 18:50:57 +0100 |
parents | 3fd805ca2a6a |
children | fb533fb6c015 |
line wrap: on
line diff
--- 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);