diff options
author | James McCoy <jamessan@jamessan.com> | 2016-10-04 13:14:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-04 13:14:56 -0400 |
commit | b1edc8abb7e0f11064fde9d4b208fb06f0c16a35 (patch) | |
tree | 04d1de6c6dbf077f191c41ee67bea89c7c4a0afd /src/nvim/screen.c | |
parent | eeec0cab584864ea2dbd3e9fe9e4a9d6a69dbff8 (diff) | |
parent | a20a00459c8e9272f6dc9b09f42b7ff329da0eea (diff) | |
download | rneovim-b1edc8abb7e0f11064fde9d4b208fb06f0c16a35.tar.gz rneovim-b1edc8abb7e0f11064fde9d4b208fb06f0c16a35.tar.bz2 rneovim-b1edc8abb7e0f11064fde9d4b208fb06f0c16a35.zip |
Merge pull request #5366 from NovaDev94/vim-7.4.1740
vim-patch:7.4.1740
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 9a2eeda8b2..47dd640e59 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2210,8 +2210,8 @@ win_line ( ///< force wrapping int vcol_off = 0; ///< offset for concealed characters int did_wcol = false; - int match_conc = false; ///< cchar for match functions - int has_match_conc = false; ///< match wants to conceal + int match_conc = 0; ///< cchar for match functions + int has_match_conc = 0; ///< match wants to conceal int old_boguscols = 0; # define VCOL_HLC (vcol - vcol_off) # define FIX_FOR_BOGUSCOLS \ @@ -2656,7 +2656,7 @@ win_line ( // Repeat for the whole displayed line. for (;; ) { - has_match_conc = false; + has_match_conc = 0; // Skip this quickly when working on the text. if (draw_state != WL_LINE) { if (draw_state == WL_CMDLINE - 1 && n_extra == 0) { @@ -2906,10 +2906,10 @@ win_line ( shl->attr_cur = shl->attr; if (cur != NULL && syn_name2id((char_u *)"Conceal") == cur->hlg_id) { - has_match_conc = true; + has_match_conc = v == (long)shl->startcol ? 2 : 1; match_conc = cur->conceal_char; } else { - has_match_conc = match_conc = false; + has_match_conc = match_conc = 0; } } else if (v == (long)shl->endcol) { shl->attr_cur = 0; @@ -3633,11 +3633,11 @@ win_line ( if (wp->w_p_cole > 0 && (wp != curwin || lnum != wp->w_cursor.lnum || conceal_cursor_line(wp)) - && ((syntax_flags & HL_CONCEAL) != 0 || has_match_conc) + && ((syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0) && !(lnum_in_visual_area && vim_strchr(wp->w_p_cocu, 'v') == NULL)) { char_attr = conceal_attr; - if (prev_syntax_id != syntax_seqnr + if ((prev_syntax_id != syntax_seqnr || has_match_conc > 1) && (syn_get_sub_char() != NUL || match_conc || wp->w_p_cole == 1) && wp->w_p_cole != 3) { |