comparison src/screen.c @ 2392:0371401d9d33 vim73

Give each syntax item a sequence number, so that we know when it starts and can show the 'cchar' for each of them.
author Bram Moolenaar <bram@vim.org>
date Sat, 24 Jul 2010 17:29:03 +0200
parents 3a5ededa240a
children 210a5605e126
comparison
equal deleted inserted replaced
2391:f1d95a986dfb 2392:0371401d9d33
2814 int feedback_old_attr = -1; 2814 int feedback_old_attr = -1;
2815 #endif 2815 #endif
2816 2816
2817 #ifdef FEAT_CONCEAL 2817 #ifdef FEAT_CONCEAL
2818 int syntax_flags = 0; 2818 int syntax_flags = 0;
2819 int syntax_id = 0; 2819 int syntax_seqnr = 0;
2820 int prev_syntax_id = 0; 2820 int prev_syntax_id = 0;
2821 int conceal_attr = hl_attr(HLF_CONCEAL); 2821 int conceal_attr = hl_attr(HLF_CONCEAL);
2822 int is_concealing = FALSE; 2822 int is_concealing = FALSE;
2823 int boguscols = 0; /* nonexistent columns added to force 2823 int boguscols = 0; /* nonexistent columns added to force
2824 wrapping */ 2824 wrapping */
4097 /* no concealing past the end of the line, it interferes 4097 /* no concealing past the end of the line, it interferes
4098 * with line highlighting */ 4098 * with line highlighting */
4099 if (c == NUL) 4099 if (c == NUL)
4100 syntax_flags = 0; 4100 syntax_flags = 0;
4101 else 4101 else
4102 syntax_flags = get_syntax_info(&syntax_id); 4102 syntax_flags = get_syntax_info(&syntax_seqnr);
4103 # endif 4103 # endif
4104 } 4104 }
4105 #endif 4105 #endif
4106 4106
4107 #ifdef FEAT_SPELL 4107 #ifdef FEAT_SPELL
4428 conceal_cursor_line(wp)) 4428 conceal_cursor_line(wp))
4429 && (syntax_flags & HL_CONCEAL) != 0 4429 && (syntax_flags & HL_CONCEAL) != 0
4430 && !lnum_in_visual_area) 4430 && !lnum_in_visual_area)
4431 { 4431 {
4432 char_attr = conceal_attr; 4432 char_attr = conceal_attr;
4433 if (prev_syntax_id != syntax_id 4433 if (prev_syntax_id != syntax_seqnr
4434 && (syn_get_sub_char() != NUL || wp->w_p_cole == 1) 4434 && (syn_get_sub_char() != NUL || wp->w_p_cole == 1)
4435 && wp->w_p_cole != 3) 4435 && wp->w_p_cole != 3)
4436 { 4436 {
4437 /* First time at this concealed item: display one 4437 /* First time at this concealed item: display one
4438 * character. */ 4438 * character. */
4441 else if (lcs_conceal != NUL) 4441 else if (lcs_conceal != NUL)
4442 c = lcs_conceal; 4442 c = lcs_conceal;
4443 else 4443 else
4444 c = ' '; 4444 c = ' ';
4445 4445
4446 prev_syntax_id = syntax_id; 4446 prev_syntax_id = syntax_seqnr;
4447 4447
4448 if (n_extra > 0) 4448 if (n_extra > 0)
4449 vcol_off += n_extra; 4449 vcol_off += n_extra;
4450 vcol += n_extra; 4450 vcol += n_extra;
4451 if (wp->w_p_wrap && n_extra > 0) 4451 if (wp->w_p_wrap && n_extra > 0)