changeset 5500:8451f643a13e v7.4.099

updated for version 7.4.099 Problem: Append in blockwise Visual mode with "$" is wrong. Solution: After "$" don't use the code that checks if the cursor was moved. (Hirohito Higashi, Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Thu, 21 Nov 2013 14:40:04 +0100
parents 3604656fdb0a
children 397bf7d448d1
files src/ops.c src/testdir/test39.in src/testdir/test39.ok src/version.c
diffstat 4 files changed, 24 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ops.c
+++ b/src/ops.c
@@ -2643,7 +2643,7 @@ op_insert(oap, count1)
 
 	/* The user may have moved the cursor before inserting something, try
 	 * to adjust the block for that. */
-	if (oap->start.lnum == curbuf->b_op_start.lnum)
+	if (oap->start.lnum == curbuf->b_op_start.lnum && !bd.is_MAX)
 	{
 	    if (oap->op_type == OP_INSERT
 		    && oap->start.col != curbuf->b_op_start.col)
--- a/src/testdir/test39.in
+++ b/src/testdir/test39.in
@@ -23,6 +23,18 @@ G$khhhhhkkcmno
 /^aaaa/
 :exe ":norm! l\<C-V>jjjlllI\<Right>\<Right>  \<Esc>"
 :/^aa/,/^$/w >> test.out
+:" Test for Visual block was created with the last <C-v>$
+/^A23$/
+:exe ":norm! l\<C-V>j$Aab\<Esc>"
+:.,/^$/w >> test.out
+:" Test for Visual block was created with the middle <C-v>$ (1)
+/^B23$/
+:exe ":norm! l\<C-V>j$hAab\<Esc>"
+:.,/^$/w >> test.out
+:" Test for Visual block was created with the middle <C-v>$ (2)
+/^C23$/
+:exe ":norm! l\<C-V>j$hhAab\<Esc>"
+:.,/^$/w >> test.out
 :" gUe must uppercase a whole word, also when ß changes to SS
 Gothe youtußeuu endYpk0wgUe
 :" gUfx must uppercase until x, inclusive.
@@ -49,6 +61,15 @@ bbbbbb
 cccccc
 dddddd
 
+A23
+4567
+
+B23
+4567
+
+C23
+4567
+
 abcdefghijklm
 abcdefghijklm
 abcdefghijklm
index 4964d6a34b93691f1a8530296cb2a2994973317a..3469f52b65c944c6d79c39b21ee2eb6b12739030
GIT binary patch
literal 420
zc$|feO>V+45QV$#NZjFFfJN;5z%n$EKtj!eSfWciHc(m;ArYzRWqXxQtd>F*#4Nt?
zy!U3TKe|s-S-08lUiWYB2huDYxd0sM<`KUBn{Lyaz%6&nu2=YUul)F00}L|801T?C
z3Sf}67GMyiLTW={6erwhCL}J#r(aW>gy^($cqvq=R;yeoxZ2VfUBRQ5)-A?V&hyJm
z{+v+|1Ow`9na+_dC@Z+Bl7tZb{jRx6Nh!~}U#@Nar-6`RM9E}2_?k{eadgFd`3Il;
F<2MZzaMS<*
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    99,
+/**/
     98,
 /**/
     97,