]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.416 v7.4.416
authorBram Moolenaar <Bram@vim.org>
Sun, 24 Aug 2014 19:19:25 +0000 (21:19 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 24 Aug 2014 19:19:25 +0000 (21:19 +0200)
Problem:    Problem with breakindent/showbreak and tabs.
Solution:   Handle tabs differently. (Christian Brabandt)

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

index e7aabe7ed5a8fa8e61aad2469d3eef6acc510802..fcc41ec334f72100db5684e743bc444066fbffb7 100644 (file)
@@ -1195,10 +1195,7 @@ win_lbr_chartabsize(wp, line, s, col, headp)
            if (wp->w_p_bri)
                added += get_breakindent_win(wp, line);
 
-           if (tab_corr)
-               size += (added / wp->w_buffer->b_p_ts) * wp->w_buffer->b_p_ts;
-           else
-               size += added;
+           size += added;
            if (col != 0)
                added = 0;
        }
index 8f40e4f7e522ad3b1adbb9e6f37b003bae623c76..79e25f79de09fdab6e74281fc09f9bb1e31bd165 100644 (file)
@@ -73,6 +73,23 @@ STARTTEST
 :let width = strlen(text[1:])+indent(2)*4+strlen(&sbr)*3 " text wraps 3 times
 :$put =g:test
 :$put =printf(\"strdisplaywidth: %d == calculated: %d\", strdisplaywidth(text), width)
+:"
+:" Test, that the string "    a\tb\tc\td\te" is correctly
+:" displayed in a 20 column wide window (see bug report
+:" https://groups.google.com/d/msg/vim_dev/ZOdg2mc9c9Y/TT8EhFjEy0IJ
+:only
+:vert 20new
+:set all& nocp breakindent briopt=min:10
+:call setline(1, ["    a\tb\tc\td\te", "    z   y       x       w       v"])
+:/^\s*a
+fbgjyl:let line1 = @0
+:?^\s*z
+fygjyl:let line2 = @0
+:quit!
+:$put ='Test 12: breakindent with wrapping Tab'
+:$put =line1
+:$put =line2
+:"
 :%w! test.out
 :qa!
 ENDTEST
index 723cb2501269bfacdde0b99ba5f3ad59b7484fd0..d89d424fb3d65b535186863e4ec61ba11892aac8 100644 (file)
@@ -53,3 +53,6 @@ Test 4: Simple breakindent + min width: 18
 
  Test 11: strdisplaywidth when breakindent is on
 strdisplaywidth: 46 == calculated: 64
+Test 12: breakindent with wrapping Tab
+d
+w
index 15b676c1d192039d7c657198eb7bb2898e948ab3..01b9082aa6a4a937829eba9d2b7ff40b636c09f9 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    416,
 /**/
     415,
 /**/