]> granicus.if.org Git - vim/commitdiff
updated for version 7.4a.013 v7.4a.013
authorBram Moolenaar <Bram@vim.org>
Sat, 13 Jul 2013 10:36:55 +0000 (12:36 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 13 Jul 2013 10:36:55 +0000 (12:36 +0200)
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'.

src/screen.c
src/testdir/test88.in
src/testdir/test88.ok
src/version.c

index e5636adbfb978000eef397a41aa9416ef4752cfb..a72ecaf20cbc5237403f4ce6e9885380c4ef617b 100644 (file)
@@ -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 */
index 1536b3bba7590c51b72340039ee3be7cffdda067..c2e6a752fa9301707cc1a1d28558ad6f78dfd8e9 100644 (file)
@@ -68,6 +68,9 @@ GGk
 GGk
 :normal $
 GGk
+:set lbr
+:normal $
+GGk
 :" Display result.
 :call append('$', 'end:')
 :call append('$', positions)
index e726258a5519c26a94088ce8f7c391aff90e2c78..e29698b7bd30e5e194c9a79ef99b0d0292fc05b0 100644 (file)
@@ -21,3 +21,4 @@ end:
 9:17
 9:25
 9:26
+9:26
index bf7c0e1949d35d752a15f81f2da52afddba343f6..60f7eb27597946ad94d32b688a2f960a99f89dba 100644 (file)
@@ -727,6 +727,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    13,
 /**/
     12,
 /**/