Mercurial > vim
diff src/screen.c @ 11836:f080b225a2a4 v8.0.0798
patch 8.0.0798: no highlighting in a terminal window with a finished job
commit https://github.com/vim/vim/commit/63ecddab6d918214371ccaaeb10c118ae7c39d02
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jul 28 22:29:35 2017 +0200
patch 8.0.0798: no highlighting in a terminal window with a finished job
Problem: No highlighting in a terminal window with a finished job.
Solution: Highlight the text.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 28 Jul 2017 22:30:05 +0200 |
parents | 0cfe4a07c2ad |
children | 97eb443fee5d |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -3130,6 +3130,9 @@ win_line( #if defined(LINE_ATTR) int did_line_attr = 0; #endif +#ifdef FEAT_TERMINAL + int get_term_attr = FALSE; +#endif /* draw_state: items that are drawn in sequence: */ #define WL_START 0 /* nothing done yet */ @@ -3241,6 +3244,14 @@ win_line( draw_color_col = advance_color_col(VCOL_HLC, &color_cols); #endif +#ifdef FEAT_TERMINAL + if (term_is_finished(wp->w_buffer)) + { + extra_check = TRUE; + get_term_attr = TRUE; + } +#endif + #ifdef FEAT_SPELL if (wp->w_p_spell && *wp->w_s->b_p_spl != NUL @@ -4527,6 +4538,18 @@ win_line( int can_spell = TRUE; #endif +#ifdef FEAT_TERMINAL + if (get_term_attr) + { + syntax_attr = term_get_attr(wp->w_buffer, lnum, col); + + if (!attr_pri) + char_attr = syntax_attr; + else + char_attr = hl_combine_attr(syntax_attr, char_attr); + } +#endif + #ifdef FEAT_SYN_HL /* Get syntax attribute, unless still at the start of the line * (double-wide char that doesn't fit). */