summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-07-13 12:36:55 +0200
committerBram Moolenaar <Bram@vim.org>2013-07-13 12:36:55 +0200
commit3ff9b185fe36cfa075d08a0a081fb29cf3899a96 (patch)
treefda3d3718b239a054f96392e0b3b3f22e012c897
parentfba2424cf2f59c0aaa870e767864f35b500bcfd8 (diff)
downloadvim-git-3ff9b185fe36cfa075d08a0a081fb29cf3899a96.tar.gz
updated for version 7.4a.013v7.4a.013
Problem: Setting/resetting 'lbr' in the main help file changes alignment after a Tab. (Dimitar Dimitrov) Solution: Also use the code for conceal mode where n_extra is computed for 'lbr'.
-rw-r--r--src/screen.c21
-rw-r--r--src/testdir/test88.in3
-rw-r--r--src/testdir/test88.ok1
-rw-r--r--src/version.c2
4 files changed, 22 insertions, 5 deletions
diff --git a/src/screen.c b/src/screen.c
index e5636adbf..a72ecaf20 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2997,6 +2997,14 @@ win_line(wp, lnum, startrow, endrow, nochange)
int vcol_off = 0; /* offset for concealed characters */
int did_wcol = FALSE;
# define VCOL_HLC (vcol - vcol_off)
+# define FIX_FOR_BOGUSCOLS \
+ { \
+ n_extra += vcol_off; \
+ vcol -= vcol_off; \
+ vcol_off = 0; \
+ col -= boguscols; \
+ boguscols = 0; \
+ }
#else
# define VCOL_HLC (vcol)
#endif
@@ -4404,7 +4412,14 @@ win_line(wp, lnum, startrow, endrow, nochange)
1), (colnr_T)vcol, NULL) - 1;
c_extra = ' ';
if (vim_iswhite(c))
+ {
+#ifdef FEAT_CONCEAL
+ if (c == TAB)
+ /* See "Tab alignment" below. */
+ FIX_FOR_BOGUSCOLS;
+#endif
c = ' ';
+ }
}
#endif
@@ -4453,11 +4468,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
* and boguscols accumulated so far in the line. Note that
* the tab can be longer than 'tabstop' when there
* are concealed characters. */
- n_extra += vcol_off;
- vcol -= vcol_off;
- vcol_off = 0;
- col -= boguscols;
- boguscols = 0;
+ FIX_FOR_BOGUSCOLS;
#endif
#ifdef FEAT_MBYTE
mb_utf8 = FALSE; /* don't draw as UTF-8 */
diff --git a/src/testdir/test88.in b/src/testdir/test88.in
index 1536b3bba..c2e6a752f 100644
--- a/src/testdir/test88.in
+++ b/src/testdir/test88.in
@@ -68,6 +68,9 @@ GGk
GGk
:normal $
GGk
+:set lbr
+:normal $
+GGk
:" Display result.
:call append('$', 'end:')
:call append('$', positions)
diff --git a/src/testdir/test88.ok b/src/testdir/test88.ok
index e726258a5..e29698b7b 100644
--- a/src/testdir/test88.ok
+++ b/src/testdir/test88.ok
@@ -21,3 +21,4 @@ end:
9:17
9:25
9:26
+9:26
diff --git a/src/version.c b/src/version.c
index bf7c0e194..60f7eb275 100644
--- a/src/version.c
+++ b/src/version.c
@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 13,
+/**/
12,
/**/
11,