summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-08-24 21:19:25 +0200
committerBram Moolenaar <Bram@vim.org>2014-08-24 21:19:25 +0200
commit95765089755c57d0d73252d4673c9d2deee337ff (patch)
tree8b60287fbbbdeed91e9fdce7d596987c27179d78 /src
parent7b61a546d84ce50f278fcc84090b2d11dbe039eb (diff)
downloadvim-git-95765089755c57d0d73252d4673c9d2deee337ff.tar.gz
updated for version 7.4.416v7.4.416
Problem: Problem with breakindent/showbreak and tabs. Solution: Handle tabs differently. (Christian Brabandt)
Diffstat (limited to 'src')
-rw-r--r--src/charset.c5
-rw-r--r--src/testdir/test_breakindent.in17
-rw-r--r--src/testdir/test_breakindent.ok3
-rw-r--r--src/version.c2
4 files changed, 23 insertions, 4 deletions
diff --git a/src/charset.c b/src/charset.c
index e7aabe7ed..fcc41ec33 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -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;
}
diff --git a/src/testdir/test_breakindent.in b/src/testdir/test_breakindent.in
index 8f40e4f7e..79e25f79d 100644
--- a/src/testdir/test_breakindent.in
+++ b/src/testdir/test_breakindent.in
@@ -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
diff --git a/src/testdir/test_breakindent.ok b/src/testdir/test_breakindent.ok
index 723cb2501..d89d424fb 100644
--- a/src/testdir/test_breakindent.ok
+++ b/src/testdir/test_breakindent.ok
@@ -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
diff --git a/src/version.c b/src/version.c
index 15b676c1d..01b9082aa 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 416,
+/**/
415,
/**/
414,