Mercurial > vim
diff src/drawscreen.c @ 30653:ac8817a83a56 v9.0.0661
patch 9.0.0661: multi-byte "lastline" in 'fillchars' does not work properly
Commit: https://github.com/vim/vim/commit/18b3500b8c517e44c23197e558aa36aed1c6916c
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Oct 4 20:35:37 2022 +0100
patch 9.0.0661: multi-byte "lastline" in 'fillchars' does not work properly
Problem: Multi-byte "lastline" item in 'fillchars' does not work properly
when the window is two columns wide.
Solution: Compute the text length correctly. (closes #11280)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 04 Oct 2022 21:45:03 +0200 |
parents | 101f08b49ed3 |
children | c7983f593fa7 |
line wrap: on
line diff
--- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -2643,15 +2643,15 @@ win_update(win_T *wp) { int scr_row = W_WINROW(wp) + wp->w_height - 1; int symbol = wp->w_fill_chars.lastline; - int len; + int charlen; char_u fillbuf[12]; // 2 characters of 6 bytes - len = mb_char2bytes(symbol, &fillbuf[0]); - len += mb_char2bytes(symbol, &fillbuf[len]); + charlen = mb_char2bytes(symbol, &fillbuf[0]); + mb_char2bytes(symbol, &fillbuf[charlen]); // Last line isn't finished: Display "@@@" in the last screen line. screen_puts_len(fillbuf, - wp->w_width > 2 ? len : wp->w_width, + (wp->w_width > 2 ? 2 : wp->w_width) * charlen, 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),