]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.210 v7.4.210
authorBram Moolenaar <Bram@vim.org>
Wed, 19 Mar 2014 17:57:54 +0000 (18:57 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 19 Mar 2014 17:57:54 +0000 (18:57 +0100)
Problem:    Visual block mode plus virtual edit doesn't work well with tabs.
            (Liang Li)
Solution:   Take coladd into account. (Christian Brabandt)

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

index 4517e4225fe04c0ea88d368607f48c3702bfe926..cd1f29e0bf20c00a76ddce9310b4d18f80eb3632 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -2646,7 +2646,15 @@ op_insert(oap, count1)
        if (oap->start.lnum == curbuf->b_op_start_orig.lnum && !bd.is_MAX)
        {
            if (oap->op_type == OP_INSERT
-                   && oap->start.col != curbuf->b_op_start_orig.col)
+                   && oap->start.col
+#ifdef FEAT_VIRTUALEDIT
+                           + oap->start.coladd
+#endif
+                       != curbuf->b_op_start_orig.col
+#ifdef FEAT_VIRTUALEDIT
+                           + curbuf->b_op_start_orig.coladd
+#endif
+                       )
            {
                oap->start.col = curbuf->b_op_start_orig.col;
                pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
@@ -2654,7 +2662,15 @@ op_insert(oap, count1)
                oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
            }
            else if (oap->op_type == OP_APPEND
-                   && oap->end.col >= curbuf->b_op_start_orig.col)
+                     && oap->end.col
+#ifdef FEAT_VIRTUALEDIT
+                           + oap->end.coladd
+#endif
+                       >= curbuf->b_op_start_orig.col
+#ifdef FEAT_VIRTUALEDIT
+                           + curbuf->b_op_start_orig.coladd
+#endif
+                       )
            {
                oap->start.col = curbuf->b_op_start_orig.col;
                /* reset pre_textlen to the value of OP_INSERT */
index 8f45f47dc3be74547bacda60a24d3b88ac43cced..c1e1cc49a65205ed84314f493bc245ee499f2fa2 100644 (file)
@@ -35,6 +35,12 @@ 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
+:/\t\tline
+:exe ":norm! 07l\<C-V>jjIx\<Esc>"
+:set ve=
+:.,/^$/w >> test.out
 :" gUe must uppercase a whole word, also when ß changes to SS
 Gothe youtußeuu end\eYpk0wgUe
 :" gUfx must uppercase until x, inclusive.
@@ -62,6 +68,10 @@ G3o98765\e2k02l\162jr\16
 :qa!
 ENDTEST
 
+               line1
+               line2
+               line3
+
 aaaaaa
 bbbbbb
 cccccc
index b459355c6ad756d297b58653a563c6c385360202..ef7a2c6442ca8ae973f2ca86e6105214a166180d 100644 (file)
Binary files a/src/testdir/test39.ok and b/src/testdir/test39.ok differ
index 65fe16254f9b19718b29cc54b9672a9b44bb1054..3b1ccd9fd79b2b61d2e5885fa68a69f5c0f4e1df 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    210,
 /**/
     209,
 /**/