summaryrefslogtreecommitdiffstats
path: root/src/message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c43
1 files changed, 31 insertions, 12 deletions
diff --git a/src/message.c b/src/message.c
index 80d6a18..03c7072 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1637,6 +1637,9 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
// Only quit when got_int was set in here.
got_int = FALSE;
+ if (attr == 0)
+ attr = HL_ATTR(HLF_MSG);
+
// if MSG_HIST flag set, add message to history
if (attr & MSG_HIST)
{
@@ -2230,6 +2233,9 @@ msg_puts_attr_len(char *str, int maxlen, int attr)
if (msg_silent != 0)
return;
+ if (attr == 0)
+ attr = HL_ATTR(HLF_MSG);
+
// if MSG_HIST flag set, add message to history
if ((attr & MSG_HIST) && maxlen < 0)
{
@@ -2678,13 +2684,15 @@ msg_scroll_up(void)
// Scrolling up doesn't result in the right background. Set the
// background here. It's not efficient, but avoids that we have to do
// it all over the code.
- screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns, ' ', ' ', 0);
+ screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns,
+ ' ', ' ', HL_ATTR(HLF_MSG));
// Also clear the last char of the last but one line if it was not
// cleared before to avoid a scroll-up.
if (ScreenAttrs[LineOffset[Rows - 2] + Columns - 1] == (sattr_T)-1)
screen_fill((int)Rows - 2, (int)Rows - 1,
- (int)Columns - 1, (int)Columns, ' ', ' ', 0);
+ (int)Columns - 1, (int)Columns,
+ ' ', ' ', HL_ATTR(HLF_MSG));
}
}
@@ -2963,7 +2971,8 @@ disp_sb_line(int row, msgchunk_T *smp, int clear_to_eol)
// If clearing the screen did not work (e.g. because of a background
// color and t_ut isn't set) clear until the last column here.
if (clear_to_eol)
- screen_fill(row, row + 1, msg_col, (int)Columns, ' ', ' ', 0);
+ screen_fill(row, row + 1, msg_col, (int)Columns,
+ ' ', ' ', HL_ATTR(HLF_MSG));
if (mp->sb_eol || mp->sb_next == NULL)
break;
@@ -3131,6 +3140,9 @@ do_more_prompt(int typed_char)
msgchunk_T *mp_last = NULL;
msgchunk_T *mp;
int i;
+ int msg_attr;
+
+ msg_attr = HL_ATTR(HLF_MSG);
// We get called recursively when a timer callback outputs a message. In
// that case don't show another prompt. Also when at the hit-Enter prompt
@@ -3340,8 +3352,8 @@ do_more_prompt(int typed_char)
// scroll up, display line at bottom
msg_scroll_up();
inc_msg_scrolled();
- screen_fill((int)Rows - 2, (int)Rows - 1, 0,
- (int)Columns, ' ', ' ', 0);
+ screen_fill((int)Rows - 2, (int)Rows - 1, 0, (int)Columns,
+ ' ', ' ', msg_attr);
mp_last = disp_sb_line((int)Rows - 2, mp_last, FALSE);
--toscroll;
}
@@ -3350,8 +3362,8 @@ do_more_prompt(int typed_char)
if (toscroll <= 0)
{
// displayed the requested text, more prompt again
- screen_fill((int)Rows - 1, (int)Rows, 0,
- (int)Columns, ' ', ' ', 0);
+ screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns,
+ ' ', ' ', msg_attr);
msg_moremsg(FALSE);
continue;
}
@@ -3364,7 +3376,7 @@ do_more_prompt(int typed_char)
}
// clear the --more-- message
- screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns, ' ', ' ', 0);
+ screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns, ' ', ' ', msg_attr);
State = oldState;
setmouse();
if (quit_more)
@@ -3710,18 +3722,25 @@ msg_clr_eos_force(void)
}
else
{
+ int msg_attr;
+
+ msg_attr = HL_ATTR(HLF_MSG);
+
#ifdef FEAT_RIGHTLEFT
if (cmdmsg_rl)
{
- screen_fill(msg_row, msg_row + 1, 0, msg_col + 1, ' ', ' ', 0);
- screen_fill(msg_row + 1, (int)Rows, 0, (int)Columns, ' ', ' ', 0);
+ screen_fill(msg_row, msg_row + 1, 0, msg_col + 1,
+ ' ', ' ', msg_attr);
+ screen_fill(msg_row + 1, (int)Rows, 0, (int)Columns,
+ ' ', ' ', msg_attr);
}
else
#endif
{
screen_fill(msg_row, msg_row + 1, msg_col, (int)Columns,
- ' ', ' ', 0);
- screen_fill(msg_row + 1, (int)Rows, 0, (int)Columns, ' ', ' ', 0);
+ ' ', ' ', msg_attr);
+ screen_fill(msg_row + 1, (int)Rows, 0, (int)Columns,
+ ' ', ' ', msg_attr);
}
}
}