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