1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2017-07-28 22:29:35 +02:00
parent d85f271bf8
commit 63ecddab6d
5 changed files with 93 additions and 8 deletions

View File

@@ -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). */