From 238d43b32859d1b4e6b7072d552289a748cbfee1 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 11 Sep 2017 22:00:51 +0200 Subject: patch 8.0.1096: terminal window in Normal mode has wrong background Problem: Terminal window in Normal mode has wrong background. Solution: Store the default background and use it for clearning until the end of the line. Not for below the last line, since there is no text there. --- src/screen.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/screen.c') diff --git a/src/screen.c b/src/screen.c index e0d4af8fc..40c9a15a1 100644 --- a/src/screen.c +++ b/src/screen.c @@ -3139,6 +3139,7 @@ win_line( #endif #ifdef FEAT_TERMINAL int get_term_attr = FALSE; + int term_attr = 0; /* background for terminal window */ #endif /* draw_state: items that are drawn in sequence: */ @@ -3256,6 +3257,7 @@ win_line( { extra_check = TRUE; get_term_attr = TRUE; + term_attr = term_get_attr(wp->w_buffer, 0, 0); } #endif @@ -5056,6 +5058,9 @@ win_line( else if (( # ifdef FEAT_DIFF diff_hlf != (hlf_T)0 || +# endif +# ifdef FEAT_TERMINAL + term_attr != 0 || # endif line_attr != 0 ) && ( @@ -5090,6 +5095,15 @@ win_line( HL_ATTR(HLF_CUL)); } } +# endif +# ifdef FEAT_TERMINAL + if (term_attr != 0) + { + char_attr = term_attr; + if (wp->w_p_cul && lnum == wp->w_cursor.lnum) + char_attr = hl_combine_attr(char_attr, + HL_ATTR(HLF_CUL)); + } # endif } #endif -- cgit v1.2.1