diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-09-11 22:00:51 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-09-11 22:00:51 +0200 |
commit | 238d43b32859d1b4e6b7072d552289a748cbfee1 (patch) | |
tree | 9fefbdd8eec997b84bc2d7c3f010911cf371e5da /src/screen.c | |
parent | a038cb5eab24a9c395861694d9b8f610ec0ccb61 (diff) | |
download | vim-git-238d43b32859d1b4e6b7072d552289a748cbfee1.tar.gz |
patch 8.0.1096: terminal window in Normal mode has wrong backgroundv8.0.1096
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.
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 14 |
1 files changed, 14 insertions, 0 deletions
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 @@ -5057,6 +5059,9 @@ win_line( # ifdef FEAT_DIFF diff_hlf != (hlf_T)0 || # endif +# ifdef FEAT_TERMINAL + term_attr != 0 || +# endif line_attr != 0 ) && ( # ifdef FEAT_RIGHTLEFT @@ -5091,6 +5096,15 @@ win_line( } } # 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 } |