summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index fa5d6683df..4735492423 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -2643,33 +2643,42 @@ win_update(win_T *wp)
#endif
else if (dy_flags & DY_TRUNCATE) // 'display' has "truncate"
{
- int scr_row = W_WINROW(wp) + wp->w_height - 1;
+ int scr_row = W_WINROW(wp) + wp->w_height - 1;
+ int symbol = wp->w_fill_chars.lastline;
+ int len;
+ char_u fillbuf[12]; // 2 characters of 6 bytes
+
+ len = mb_char2bytes(symbol, &fillbuf[0]);
+ len += mb_char2bytes(symbol, &fillbuf[len]);
// Last line isn't finished: Display "@@@" in the last screen line.
- screen_puts_len((char_u *)"@@", wp->w_width > 2 ? 2 : wp->w_width,
- scr_row, wp->w_wincol, HL_ATTR(HLF_AT));
+ screen_puts_len(fillbuf,
+ wp->w_width > 2 ? len : wp->w_width,
+ scr_row, wp->w_wincol, HL_ATTR(HLF_AT));
screen_fill(scr_row, scr_row + 1,
(int)wp->w_wincol + 2, (int)W_ENDCOL(wp),
- '@', ' ', HL_ATTR(HLF_AT));
+ symbol, ' ', HL_ATTR(HLF_AT));
set_empty_rows(wp, srow);
wp->w_botline = lnum;
}
else if (dy_flags & DY_LASTLINE) // 'display' has "lastline"
{
int start_col = (int)W_ENDCOL(wp) - 3;
+ int symbol = wp->w_fill_chars.lastline;
// Last line isn't finished: Display "@@@" at the end.
screen_fill(W_WINROW(wp) + wp->w_height - 1,
W_WINROW(wp) + wp->w_height,
start_col < wp->w_wincol ? wp->w_wincol : start_col,
(int)W_ENDCOL(wp),
- '@', '@', HL_ATTR(HLF_AT));
+ symbol, symbol, HL_ATTR(HLF_AT));
set_empty_rows(wp, srow);
wp->w_botline = lnum;
}
else
{
- win_draw_end(wp, '@', ' ', TRUE, srow, wp->w_height, HLF_AT);
+ win_draw_end(wp, wp->w_fill_chars.lastline, ' ', TRUE,
+ srow, wp->w_height, HLF_AT);
wp->w_botline = lnum;
}
}