summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-10-04 14:36:29 +0100
committerBram Moolenaar <Bram@vim.org>2022-10-04 14:36:29 +0100
commit4ba5f1dab656103e8f4a4505452d1816b9e83c1e (patch)
tree9485d33fa43b47acb7dcd42e5b4d17f7f152fdee /src/drawscreen.c
parent2f7e1b8b40dbc97752b8b816560f752f16e0207a (diff)
patch 9.0.0656: cannot specify another character to use instead of '@'v9.0.0656
Problem: Cannot specify another character to use instead of '@' at the end of the window. Solution: Add "lastline" to 'fillchars'. (Martin Tournoij, closes #11264, closes #10963)
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;
}
}