Mercurial > vim
diff src/drawline.c @ 21010:ca2e18364888 v8.2.1056
patch 8.2.1056: wrong display when mixing match conceal and syntax conceal
Commit: https://github.com/vim/vim/commit/211dd3fd82216ca879fe7f917ea345b3ae366ce1
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 25 20:07:04 2020 +0200
patch 8.2.1056: wrong display when mixing match conceal and syntax conceal
Problem: Wrong display when mixing match conceal and syntax conceal.
Solution: Adjust how conceal flags are used. (closes https://github.com/vim/vim/issues/6327, closes https://github.com/vim/vim/issues/6303)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 25 Jun 2020 20:15:32 +0200 |
parents | 802bf80bcfe4 |
children | 20133655107a |
line wrap: on
line diff
--- a/src/drawline.c +++ b/src/drawline.c @@ -967,7 +967,7 @@ win_line( for (;;) { #if defined(FEAT_CONCEAL) || defined(FEAT_SEARCH_EXTRA) - int has_match_conc = 0; // match wants to conceal + int has_match_conc = 0; // match wants to conceal #endif #ifdef FEAT_CONCEAL int did_decrement_ptr = FALSE; @@ -2353,13 +2353,14 @@ win_line( { char_attr = conceal_attr; if ((prev_syntax_id != syntax_seqnr || has_match_conc > 1) - && (syn_get_sub_char() != NUL || match_conc - || wp->w_p_cole == 1) + && (syn_get_sub_char() != NUL + || (has_match_conc && match_conc) + || wp->w_p_cole == 1) && wp->w_p_cole != 3) { // First time at this concealed item: display one // character. - if (match_conc) + if (has_match_conc && match_conc) c = match_conc; else if (syn_get_sub_char() != NUL) c = syn_get_sub_char();