Mercurial > vim
changeset 6685:fd495ad521dc v7.4.667
updated for version 7.4.667
Problem: 'colorcolumn' isn't drawn in a closed fold while 'cursorcolumn'
is. (Carlos Pita)
Solution: Make it consistent. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 20 Mar 2015 17:16:27 +0100 |
parents | f801bd0355bf |
children | 1158f411fecf |
files | src/screen.c src/version.c |
diffstat | 2 files changed, 24 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -2740,6 +2740,28 @@ fold_line(wp, fold_count, foldinfo, lnum } #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) {