| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.853 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 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) |
| Files: src/testdir/test69.in, src/testdir/test69.ok, src/ops.c |
| |
| |
| |
| |
| |
| *** 1,5 **** |
| --- 1,6 ---- |
| Test for multi-byte text formatting. |
| Also test, that 'mps' with multibyte chars works. |
| + And test "ra" on multi-byte characters. |
| |
| STARTTEST |
| :so mbyte.vim |
| |
| *** 144,149 **** |
| --- 145,159 ---- |
| ‘ two three ’ four |
| } |
| STARTTEST |
| + /^ra test |
| + jVjra |
| + ENDTEST |
| + |
| + ra test |
| + abba |
| + aab |
| + |
| + STARTTEST |
| :g/^STARTTEST/.,/^ENDTEST/d |
| :1;/^Results/,$wq! test.out |
| ENDTEST |
| |
| |
| |
| *** 144,146 **** |
| --- 144,151 ---- |
| { |
| four |
| } |
| + |
| + ra test |
| + aaaa |
| + aaa |
| + |
| |
| |
| |
| *** 2194,2200 **** |
| { |
| /* 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); |
| n = State; |
| State = REPLACE; |
| ins_char(c); |
| --- 2194,2201 ---- |
| { |
| /* This is slow, but it handles replacing a single-byte |
| * with a multi-byte and the other way around. */ |
| ! if (curwin->w_cursor.lnum == oap->end.lnum) |
| ! oap->end.col += (*mb_char2len)(c) - (*mb_char2len)(n); |
| n = State; |
| State = REPLACE; |
| ins_char(c); |
| |
| |
| |
| *** 730,731 **** |
| --- 730,733 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 853, |
| /**/ |
| |
| -- |
| What a wonderfully exciting cough! Do you mind if I join you? |
| -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |