mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 19:18:34 +00:00
vim-patch:7.4.1740
Problem: syn-cchar defined with matchadd() does not appear if there are no
other syntax definitions which matches buffer text.
Solution: Check for startcol. (Ozaki Kiichi, haya14busa, closes vim/vim#757)
4d58502202
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user