073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.210
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.210
073263
Problem:    Visual block mode plus virtual edit doesn't work well with tabs.
073263
	    (Liang Li) 
073263
Solution:   Take coladd into account. (Christian Brabandt)
073263
Files:	    src/ops.c, src/testdir/test39.in, src/testdir/test39.ok
073263
073263
073263
*** ../vim-7.4.209/src/ops.c	2014-02-22 23:03:48.716901208 +0100
073263
--- src/ops.c	2014-03-19 18:33:54.118153904 +0100
073263
***************
073263
*** 2646,2652 ****
073263
  	if (oap->start.lnum == curbuf->b_op_start_orig.lnum && !bd.is_MAX)
073263
  	{
073263
  	    if (oap->op_type == OP_INSERT
073263
! 		    && oap->start.col != curbuf->b_op_start_orig.col)
073263
  	    {
073263
  		oap->start.col = curbuf->b_op_start_orig.col;
073263
  		pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
073263
--- 2646,2660 ----
073263
  	if (oap->start.lnum == curbuf->b_op_start_orig.lnum && !bd.is_MAX)
073263
  	{
073263
  	    if (oap->op_type == OP_INSERT
073263
! 		    && oap->start.col
073263
! #ifdef FEAT_VIRTUALEDIT
073263
! 			    + oap->start.coladd
073263
! #endif
073263
! 			!= curbuf->b_op_start_orig.col
073263
! #ifdef FEAT_VIRTUALEDIT
073263
! 			    + curbuf->b_op_start_orig.coladd
073263
! #endif
073263
! 			)
073263
  	    {
073263
  		oap->start.col = curbuf->b_op_start_orig.col;
073263
  		pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
073263
***************
073263
*** 2654,2660 ****
073263
  		oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
073263
  	    }
073263
  	    else if (oap->op_type == OP_APPEND
073263
! 		    && oap->end.col >= curbuf->b_op_start_orig.col)
073263
  	    {
073263
  		oap->start.col = curbuf->b_op_start_orig.col;
073263
  		/* reset pre_textlen to the value of OP_INSERT */
073263
--- 2662,2676 ----
073263
  		oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
073263
  	    }
073263
  	    else if (oap->op_type == OP_APPEND
073263
! 		      && oap->end.col
073263
! #ifdef FEAT_VIRTUALEDIT
073263
! 			    + oap->end.coladd
073263
! #endif
073263
! 			>= curbuf->b_op_start_orig.col
073263
! #ifdef FEAT_VIRTUALEDIT
073263
! 			    + curbuf->b_op_start_orig.coladd
073263
! #endif
073263
! 			)
073263
  	    {
073263
  		oap->start.col = curbuf->b_op_start_orig.col;
073263
  		/* reset pre_textlen to the value of OP_INSERT */
073263
*** ../vim-7.4.209/src/testdir/test39.in	2014-01-14 13:18:53.000000000 +0100
073263
--- src/testdir/test39.in	2014-03-19 18:35:31.382155394 +0100
073263
***************
073263
*** 35,40 ****
073263
--- 35,46 ----
073263
  /^C23$/
073263
  :exe ":norm! l\<C-V>j$hhAab\<Esc>"
073263
  :.,/^$/w >> test.out
073263
+ :" Test for Visual block insert when virtualedit=all
073263
+ :set ve=all
073263
+ :/\t\tline
073263
+ :exe ":norm! 07l\<C-V>jjIx\<Esc>"
073263
+ :set ve=
073263
+ :.,/^$/w >> test.out
073263
  :" gUe must uppercase a whole word, also when ß changes to SS
073263
  Gothe youtußeuu end?Ypk0wgUe
073263
  :" gUfx must uppercase until x, inclusive.
073263
***************
073263
*** 62,67 ****
073263
--- 68,77 ----
073263
  :qa!
073263
  ENDTEST
073263
  
073263
+ 		line1
073263
+ 		line2
073263
+ 		line3
073263
+ 
073263
  aaaaaa
073263
  bbbbbb
073263
  cccccc
073263
*** ../vim-7.4.209/src/testdir/test39.ok	2014-01-14 13:18:53.000000000 +0100
073263
--- src/testdir/test39.ok	2014-03-19 18:34:18.206154273 +0100
073263
***************
073263
*** 17,22 ****
073263
--- 17,26 ----
073263
  C23ab
073263
  456ab7
073263
  
073263
+        x 	line1
073263
+        x 	line2
073263
+        x 	line3
073263
+ 
073263
  the YOUTUSSEUU end
073263
  - yOUSSTUSSEXu -
073263
  THE YOUTUSSEUU END
073263
*** ../vim-7.4.209/src/version.c	2014-03-19 17:41:20.390105580 +0100
073263
--- src/version.c	2014-03-19 18:27:19.746147861 +0100
073263
***************
073263
*** 740,741 ****
073263
--- 740,743 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     210,
073263
  /**/
073263
073263
-- 
073263
SUPERIMPOSE "England AD 787".  After a few more seconds we hear hoofbeats in
073263
the distance.  They come slowly closer.  Then out of the mist comes KING
073263
ARTHUR followed by a SERVANT who is banging two half coconuts together.
073263
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///