mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
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.
This commit is contained in:
14
src/screen.c
14
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
|
||||
|
Reference in New Issue
Block a user