diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-07-28 22:29:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-07-28 22:29:35 +0200 |
commit | 63ecddab6d918214371ccaaeb10c118ae7c39d02 (patch) | |
tree | 7c5f8f89a456a607c850e0f83db2d57135b1f0b6 /src/screen.c | |
parent | d85f271bf8516dbd90be4d18f905f0abbfcd6db6 (diff) | |
download | vim-git-63ecddab6d918214371ccaaeb10c118ae7c39d02.tar.gz |
patch 8.0.0798: no highlighting in a terminal window with a finished jobv8.0.0798
Problem: No highlighting in a terminal window with a finished job.
Solution: Highlight the text.
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c index 7d62042cb..40f83c0b6 100644 --- 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). */ |