]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.559 v7.4.559
authorBram Moolenaar <Bram@vim.org>
Wed, 17 Dec 2014 17:35:42 +0000 (18:35 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 17 Dec 2014 17:35:42 +0000 (18:35 +0100)
Problem:    Appending a block in the middle of a tab does not work correctly
            when virtualedit is set.
Solution:   Decrement spaces and count, don't reset them. (James McCoy)

src/ops.c
src/testdir/test39.in
src/testdir/test39.ok
src/version.c

index edc84a07aa2730518c8c41bc7b2cfaa5906419d1..0db8c2d25ca6c60c358a58632243ed07cddac8a9 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -612,20 +612,20 @@ block_insert(oap, s, b_insert, bdp)
 #ifdef FEAT_MBYTE
        if (has_mbyte && spaces > 0)
        {
+           int off;
+
            /* Avoid starting halfway a multi-byte character. */
            if (b_insert)
            {
-               int off = (*mb_head_off)(oldp, oldp + offset + spaces);
-               spaces -= off;
-               count -= off;
+               off = (*mb_head_off)(oldp, oldp + offset + spaces);
            }
            else
            {
-               int off = (*mb_off_next)(oldp, oldp + offset);
+               off = (*mb_off_next)(oldp, oldp + offset);
                offset += off;
-               spaces = 0;
-               count = 0;
            }
+           spaces -= off;
+           count -= off;
        }
 #endif
 
index 410dea61ae14c04d4dff581ac56a92c2cfb7fe43..c4e46fff262d09a0e718a879f7c81bfd4d44d37a 100644 (file)
@@ -38,11 +38,14 @@ G$khhh\16hhkkcmno\e
 /^C23$/
 :exe ":norm! l\<C-V>j$hhAab\<Esc>"
 :.,/^$/w >> test.out
-:" Test for Visual block insert when virtualedit=all
-:set ve=all
+:" Test for Visual block insert when virtualedit=all and utf-8 encoding
+:set ve=all enc=utf-8
 :/\t\tline
 :exe ":norm! 07l\<C-V>jjIx\<Esc>"
-:set ve=
+:.,/^$/w >> test.out
+:" Test for Visual block append when virtualedit=all
+:exe ":norm! 012l\<C-v>jjAx\<Esc>"
+:set ve= enc=latin1
 :.,/^$/w >> test.out
 :" gUe must uppercase a whole word, also when ß changes to SS
 Gothe youtußeuu end\eYpk0wgUe
index d8e901563af492e50b8f70c470fee5678644dc0c..5c517e2223d5c830ca8297b7c8ec71d180777d82 100644 (file)
Binary files a/src/testdir/test39.ok and b/src/testdir/test39.ok differ
index 4efee6ae8c71f6a77a62aac4d04528ac63f60c65..e2ac04052e66a90f3892c40821574fcc98f6f07f 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    559,
 /**/
     558,
 /**/