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


*** ../vim-7.3.852/src/testdir/test69.in        2013-01-17 17:01:57.000000000 
+0100
--- src/testdir/test69.in       2013-03-07 18:30:50.000000000 +0100
***************
*** 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
*** ../vim-7.3.852/src/testdir/test69.ok        2013-01-17 17:01:57.000000000 
+0100
--- src/testdir/test69.ok       2013-03-07 18:31:32.000000000 +0100
***************
*** 144,146 ****
--- 144,151 ----
  {
   four
  }
+ 
+ ra test
+ aaaa
+ aaa
+ 
*** ../vim-7.3.852/src/ops.c    2013-03-07 18:02:27.000000000 +0100
--- src/ops.c   2013-03-07 18:35:01.000000000 +0100
***************
*** 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);
*** ../vim-7.3.852/src/version.c        2013-03-07 18:02:27.000000000 +0100
--- src/version.c       2013-03-07 18:36:46.000000000 +0100
***************
*** 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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui