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:
23
src/screen.c
23
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). */
|
||||
|
Reference in New Issue
Block a user