Karsten Hopp de596c
To: vim_dev@googlegroups.com
Karsten Hopp de596c
Subject: Patch 7.4.594
Karsten Hopp de596c
Fcc: outbox
Karsten Hopp de596c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp de596c
Mime-Version: 1.0
Karsten Hopp de596c
Content-Type: text/plain; charset=UTF-8
Karsten Hopp de596c
Content-Transfer-Encoding: 8bit
Karsten Hopp de596c
------------
Karsten Hopp de596c
Karsten Hopp de596c
Patch 7.4.594
Karsten Hopp de596c
Problem:    Using a block delete while 'breakindent' is set does not work
Karsten Hopp de596c
	    properly.
Karsten Hopp de596c
Solution:   Use "line" instead of "prev_pend" as the first argument to
Karsten Hopp de596c
	    lbr_chartabsize_adv().  (Hirohito Higashi)
Karsten Hopp de596c
Files:	    src/ops.c, src/testdir/test_breakindent.in,
Karsten Hopp de596c
	    src/testdir/test_breakindent.ok
Karsten Hopp de596c
Karsten Hopp de596c
Karsten Hopp de596c
*** ../vim-7.4.593/src/ops.c	2015-01-18 14:08:52.699436994 +0100
Karsten Hopp de596c
--- src/ops.c	2015-01-27 13:07:11.518790582 +0100
Karsten Hopp de596c
***************
Karsten Hopp de596c
*** 5308,5317 ****
Karsten Hopp de596c
  	    {
Karsten Hopp de596c
  		/* Count a tab for what it's worth (if list mode not on) */
Karsten Hopp de596c
  		prev_pend = pend;
Karsten Hopp de596c
! 		/* TODO: is passing prev_pend for start of the line OK?
Karsten Hopp de596c
! 		 * perhaps it should be "line". */
Karsten Hopp de596c
! 		incr = lbr_chartabsize_adv(prev_pend, &pend,
Karsten Hopp de596c
! 						      (colnr_T)bdp->end_vcol);
Karsten Hopp de596c
  		bdp->end_vcol += incr;
Karsten Hopp de596c
  	    }
Karsten Hopp de596c
  	    if (bdp->end_vcol <= oap->end_vcol
Karsten Hopp de596c
--- 5308,5314 ----
Karsten Hopp de596c
  	    {
Karsten Hopp de596c
  		/* Count a tab for what it's worth (if list mode not on) */
Karsten Hopp de596c
  		prev_pend = pend;
Karsten Hopp de596c
! 		incr = lbr_chartabsize_adv(line, &pend, (colnr_T)bdp->end_vcol);
Karsten Hopp de596c
  		bdp->end_vcol += incr;
Karsten Hopp de596c
  	    }
Karsten Hopp de596c
  	    if (bdp->end_vcol <= oap->end_vcol
Karsten Hopp de596c
*** ../vim-7.4.593/src/testdir/test_breakindent.in	2014-11-27 14:09:09.490354943 +0100
Karsten Hopp de596c
--- src/testdir/test_breakindent.in	2015-01-27 13:06:51.067014258 +0100
Karsten Hopp de596c
***************
Karsten Hopp de596c
*** 99,104 ****
Karsten Hopp de596c
--- 99,121 ----
Karsten Hopp de596c
  :$put =line1
Karsten Hopp de596c
  :$put =line2
Karsten Hopp de596c
  :"
Karsten Hopp de596c
+ :let g:test="Test 14: breakindent + visual blockwise delete #1"
Karsten Hopp de596c
+ :set all& breakindent
Karsten Hopp de596c
+ :30vnew
Karsten Hopp de596c
+ :normal! 3a1234567890
Karsten Hopp de596c
+ :normal! a    abcde
Karsten Hopp de596c
+ :exec "normal! 0\<C-V>tex"
Karsten Hopp de596c
+ :let line1=ScreenChar(line('.'),8)
Karsten Hopp de596c
+ :call DoRecordScreen()
Karsten Hopp de596c
+ :"
Karsten Hopp de596c
+ :let g:test="Test 15: breakindent + visual blockwise delete #2"
Karsten Hopp de596c
+ :%d
Karsten Hopp de596c
+ :normal! 4a1234567890
Karsten Hopp de596c
+ :exec "normal! >>\<C-V>3f0x"
Karsten Hopp de596c
+ :let line1=ScreenChar(line('.'),20)
Karsten Hopp de596c
+ :call DoRecordScreen()
Karsten Hopp de596c
+ :quit!
Karsten Hopp de596c
+ :"
Karsten Hopp de596c
  :%w! test.out
Karsten Hopp de596c
  :qa!
Karsten Hopp de596c
  ENDTEST
Karsten Hopp de596c
*** ../vim-7.4.593/src/testdir/test_breakindent.ok	2014-11-27 14:09:09.490354943 +0100
Karsten Hopp de596c
--- src/testdir/test_breakindent.ok	2015-01-27 13:06:51.067014258 +0100
Karsten Hopp de596c
***************
Karsten Hopp de596c
*** 62,64 ****
Karsten Hopp de596c
--- 62,74 ----
Karsten Hopp de596c
  Test 13: breakindent with wrapping Tab
Karsten Hopp de596c
  d
Karsten Hopp de596c
  w
Karsten Hopp de596c
+ 
Karsten Hopp de596c
+ Test 14: breakindent + visual blockwise delete #1
Karsten Hopp de596c
+ e       
Karsten Hopp de596c
+ ~       
Karsten Hopp de596c
+ ~       
Karsten Hopp de596c
+ 
Karsten Hopp de596c
+ Test 15: breakindent + visual blockwise delete #2
Karsten Hopp de596c
+         1234567890  
Karsten Hopp de596c
+ ~                   
Karsten Hopp de596c
+ ~                   
Karsten Hopp de596c
*** ../vim-7.4.593/src/version.c	2015-01-27 12:59:51.859602392 +0100
Karsten Hopp de596c
--- src/version.c	2015-01-27 13:10:18.260748209 +0100
Karsten Hopp de596c
***************
Karsten Hopp de596c
*** 743,744 ****
Karsten Hopp de596c
--- 743,746 ----
Karsten Hopp de596c
  {   /* Add new patch number below this line */
Karsten Hopp de596c
+ /**/
Karsten Hopp de596c
+     594,
Karsten Hopp de596c
  /**/
Karsten Hopp de596c
Karsten Hopp de596c
-- 
Karsten Hopp de596c
hundred-and-one symptoms of being an internet addict:
Karsten Hopp de596c
122. You ask if the Netaholics Anonymous t-shirt you ordered can be
Karsten Hopp de596c
     sent to you via e-mail.
Karsten Hopp de596c
Karsten Hopp de596c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp de596c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp de596c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp de596c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///