]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.667 v7.4.667
authorBram Moolenaar <Bram@vim.org>
Fri, 20 Mar 2015 16:16:27 +0000 (17:16 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 20 Mar 2015 16:16:27 +0000 (17:16 +0100)
Problem:    'colorcolumn' isn't drawn in a closed fold while 'cursorcolumn'
            is. (Carlos Pita)
Solution:   Make it consistent. (Christian Brabandt)

src/screen.c
src/version.c

index 1addd0ad41ad61dee684ebca22dacfb54e0bedc7..fd15ad18f3834c7083f18638be8c27866b38e99c 100644 (file)
@@ -2740,6 +2740,28 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
     }
 
 #ifdef FEAT_SYN_HL
+    /* Show colorcolumn in the fold line, but let cursorcolumn override it. */
+    if (wp->w_p_cc_cols)
+    {
+       int i = 0;
+       int j = wp->w_p_cc_cols[i];
+       int old_txtcol = txtcol;
+
+       while (j > -1)
+       {
+           txtcol += j;
+           if (wp->w_p_wrap)
+               txtcol -= wp->w_skipcol;
+           else
+               txtcol -= wp->w_leftcol;
+           if (txtcol >= 0 && txtcol < W_WIDTH(wp))
+               ScreenAttrs[off + txtcol] = hl_combine_attr(
+                                   ScreenAttrs[off + txtcol], hl_attr(HLF_MC));
+           txtcol = old_txtcol;
+           j = wp->w_p_cc_cols[++i];
+       }
+    }
+
     /* Show 'cursorcolumn' in the fold line. */
     if (wp->w_p_cuc)
     {
index f9b47b17f0bd764d51c66b7cb4d39f5918dfb30d..c721e0784c0167f769483f7312f476cd483664fb 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    667,
 /**/
     666,
 /**/