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