Commit: patch 9.2.0101: statusline drawing issue for multi-lines

0 views
Skip to first unread message

Christian Brabandt

unread,
3:16 PM (4 hours ago) 3:16 PM
to vim...@googlegroups.com
patch 9.2.0101: statusline drawing issue for multi-lines

Commit: https://github.com/vim/vim/commit/b0ad5c077ba8d8495ba47b1e689b2483062aee0b
Author: Hirohito Higashi <h.eas...@gmail.com>
Date: Tue Mar 3 20:02:07 2026 +0000

patch 9.2.0101: statusline drawing issue for multi-lines

Problem: statusline drawing issue for multi-lines
(after v9.2.0083)
Solution: Correctly redraw multi-line statusline
(Hirohito Higashi).

closes: #19551

Signed-off-by: Hirohito Higashi <h.eas...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/drawscreen.c b/src/drawscreen.c
index 8ce8826c1..8c985394a 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -566,9 +566,12 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED)
}

screen_puts(p, row, wp->w_wincol, attr);
- for (i = 0; i < wp->w_status_height; i++)
- screen_fill(row + i, row + i + 1, plen + wp->w_wincol,
- this_ru_col + wp->w_wincol, fillchar, fillchar, attr);
+ screen_fill(row, row + 1, plen + wp->w_wincol,
+ this_ru_col + wp->w_wincol, fillchar, fillchar, attr);
+ // Fill extra status line rows entirely with fillchar.
+ for (i = 1; i < wp->w_status_height; i++)
+ screen_fill(row + i, row + i + 1, wp->w_wincol,
+ W_ENDCOL(wp), fillchar, fillchar, attr);
if ((NameBufflen = get_keymap_str(wp, (char_u *)"<%s>", NameBuff, MAXPATHL)) > 0
&& (this_ru_col - plen) > (NameBufflen + 1))
screen_puts(NameBuff, row, (int)(this_ru_col - NameBufflen
diff --git a/src/testdir/dumps/Test_statuslineopt_default_stl_01.dump b/src/testdir/dumps/Test_statuslineopt_default_stl_01.dump
new file mode 100644
index 000000000..e26a6915e
--- /dev/null
+++ b/src/testdir/dumps/Test_statuslineopt_default_stl_01.dump
@@ -0,0 +1,8 @@
+> +0&#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|[+3#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
+| @74
+@75
+@75
+| +0&&@74
diff --git a/src/testdir/test_statuslineopt.vim b/src/testdir/test_statuslineopt.vim
index cc137a98b..7fcf489bf 100644
--- a/src/testdir/test_statuslineopt.vim
+++ b/src/testdir/test_statuslineopt.vim
@@ -148,4 +148,22 @@ func Test_multistatusline_highlight()
call StopVimInTerminal(buf)
endfunc

+func Test_statuslineopt_default_stl()
+ CheckScreendump
+
+ let lines =<< trim END
+ set laststatus=2
+ set statuslineopt=maxheight:4
+ END
+ call writefile(lines, 'XTest_statuslineopt_default_stl', 'D')
+
+ " With no custom statusline, the extra status rows must be filled with
+ " fillchar and must not bleed through buffer content.
+ let buf = g:RunVimInTerminal('-S XTest_statuslineopt_default_stl', {'rows': 8})
+ call term_sendkeys(buf, "\<C-L>")
+ call VerifyScreenDump(buf, 'Test_statuslineopt_default_stl_01', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index 4f86d6cc1..ebf573e1a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 101,
/**/
100,
/**/
Reply all
Reply to author
Forward
0 new messages