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.
diff --git a/src/screen.c b/src/screen.c
index 7d62042..40f83c0 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3130,6 +3130,9 @@
#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 @@
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 @@
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). */