]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.747 v7.3.747
authorBram Moolenaar <Bram@vim.org>
Wed, 5 Dec 2012 14:32:30 +0000 (15:32 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 5 Dec 2012 14:32:30 +0000 (15:32 +0100)
Problem:    When characters are concealed text aligned with tabs are no longer
            aligned, e.g. at ":help :index".
Solution:   Compensate space for tabs for concealed characters. (Dominique
            Pelle)

src/screen.c
src/version.c

index 0e76d8cef2e7b9468ccc1db40536a56804942f95..438627aceb0e8512cb06baab460e5a2884159bcf 100644 (file)
@@ -4269,7 +4269,20 @@ win_line(wp, lnum, startrow, endrow, nochange)
                {
                    /* tab amount depends on current column */
                    n_extra = (int)wp->w_buffer->b_p_ts
-                                  - VCOL_HLC % (int)wp->w_buffer->b_p_ts - 1;
+                                       - vcol % (int)wp->w_buffer->b_p_ts - 1;
+#ifdef FEAT_CONCEAL
+                   /* Tab alignment should be identical regardless of
+                    * 'conceallevel' value. So tab compensates of all
+                    * previous concealed characters, and thus resets vcol_off
+                    * 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;
+#endif
 #ifdef FEAT_MBYTE
                    mb_utf8 = FALSE;    /* don't draw as UTF-8 */
 #endif
index 411d55823f7d922c2bb228682a9dccd4802b39fa..ad2816e738f549b9a6ded0b6c7750dc3a029dcf0 100644 (file)
@@ -725,6 +725,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    747,
 /**/
     746,
 /**/