]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0101: statusline drawing issue for multi-lines v9.2.0101
authorHirohito Higashi <h.east.727@gmail.com>
Tue, 3 Mar 2026 20:02:07 +0000 (20:02 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 3 Mar 2026 20:02:07 +0000 (20:02 +0000)
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.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/drawscreen.c
src/testdir/dumps/Test_statuslineopt_default_stl_01.dump [new file with mode: 0644]
src/testdir/test_statuslineopt.vim
src/version.c

index 8ce8826c12e3b24863f2fda4ee132ee439260b93..8c985394a7e12ed690aec1f84cd17421a2975f92 100644 (file)
@@ -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 (file)
index 0000000..e26a691
--- /dev/null
@@ -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
index cc137a98b681116d482ce78152db60ba2eb3e346..7fcf489bf1dba77be55efe70adb102a310afb9c6 100644 (file)
@@ -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
index 4f86d6cc12026f629b31807c7edf244755c25182..ebf573e1aa41501b7111b246efc29bc0643c1a3b 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    101,
 /**/
     100,
 /**/