]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.594 v7.4.594
authorBram Moolenaar <Bram@vim.org>
Tue, 27 Jan 2015 12:22:20 +0000 (13:22 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 27 Jan 2015 12:22:20 +0000 (13:22 +0100)
Problem:    Using a block delete while 'breakindent' is set does not work
            properly.
Solution:   Use "line" instead of "prev_pend" as the first argument to
            lbr_chartabsize_adv().  (Hirohito Higashi)

src/ops.c
src/testdir/test_breakindent.in
src/testdir/test_breakindent.ok
src/version.c

index f0d372d898e6abc8b88c5753b77722c10da1ef25..6df1121a5f4394e688ca5a36bd0c6bac7e2b514e 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -5308,10 +5308,7 @@ block_prep(oap, bdp, lnum, is_del)
            {
                /* Count a tab for what it's worth (if list mode not on) */
                prev_pend = pend;
-               /* TODO: is passing prev_pend for start of the line OK?
-                * perhaps it should be "line". */
-               incr = lbr_chartabsize_adv(prev_pend, &pend,
-                                                     (colnr_T)bdp->end_vcol);
+               incr = lbr_chartabsize_adv(line, &pend, (colnr_T)bdp->end_vcol);
                bdp->end_vcol += incr;
            }
            if (bdp->end_vcol <= oap->end_vcol
index a255457b2e6f3df6eaf8d2f705473523942cc02c..f9d903e51b9da33ed284f2d3b28f326f28ca443d 100644 (file)
@@ -99,6 +99,23 @@ fygjyl:let line2 = @0
 :$put =line1
 :$put =line2
 :"
+:let g:test="Test 14: breakindent + visual blockwise delete #1"
+:set all& breakindent
+:30vnew
+:normal! 3a1234567890
+:normal! a    abcde
+:exec "normal! 0\<C-V>tex"
+:let line1=ScreenChar(line('.'),8)
+:call DoRecordScreen()
+:"
+:let g:test="Test 15: breakindent + visual blockwise delete #2"
+:%d
+:normal! 4a1234567890
+:exec "normal! >>\<C-V>3f0x"
+:let line1=ScreenChar(line('.'),20)
+:call DoRecordScreen()
+:quit!
+:"
 :%w! test.out
 :qa!
 ENDTEST
index e50265ecdd456b577a2754975ad2ec8f22cc4768..3eb9c24fd994f6c732a79337e88a5dc3b14d5938 100644 (file)
@@ -62,3 +62,13 @@ strdisplaywidth: 46 == calculated: 64
 Test 13: breakindent with wrapping Tab
 d
 w
+
+Test 14: breakindent + visual blockwise delete #1
+e       
+~       
+~       
+
+Test 15: breakindent + visual blockwise delete #2
+        1234567890  
+~                   
+~                   
index 6a40cfa32c9644c9b65d828706bb57159b13516b..9ae697e4a10f7c08fd56afaa1fa80691d8f2569c 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    594,
 /**/
     593,
 /**/