mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.2685: custom statusline not drawn correctly with WinBar
Problem: Custom statusline not drawn correctly with WinBar. Solution: Also adjust the column for the custom status line. (Yee Cheng Chin, closes #8047)
This commit is contained in:
@@ -380,7 +380,7 @@ update_screen(int type_arg)
|
|||||||
/*
|
/*
|
||||||
* Return the row for drawing the statusline and the ruler of window "wp".
|
* Return the row for drawing the statusline and the ruler of window "wp".
|
||||||
*/
|
*/
|
||||||
static int
|
int
|
||||||
statusline_row(win_T *wp)
|
statusline_row(win_T *wp)
|
||||||
{
|
{
|
||||||
#if defined(FEAT_PROP_POPUP)
|
#if defined(FEAT_PROP_POPUP)
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/* drawscreen.c */
|
/* drawscreen.c */
|
||||||
int update_screen(int type_arg);
|
int update_screen(int type_arg);
|
||||||
|
int statusline_row(win_T *wp);
|
||||||
void showruler(int always);
|
void showruler(int always);
|
||||||
void win_redr_ruler(win_T *wp, int always, int ignore_pum);
|
void win_redr_ruler(win_T *wp, int always, int ignore_pum);
|
||||||
void after_updating_screen(int may_resize_shell);
|
void after_updating_screen(int may_resize_shell);
|
||||||
|
@@ -1248,7 +1248,7 @@ win_redr_custom(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
row = W_WINROW(wp) + wp->w_height;
|
row = statusline_row(wp);
|
||||||
fillchar = fillchar_status(&attr, wp);
|
fillchar = fillchar_status(&attr, wp);
|
||||||
maxwidth = wp->w_width;
|
maxwidth = wp->w_width;
|
||||||
|
|
||||||
|
@@ -0,0 +1,10 @@
|
|||||||
|
|a+1&#ffffff0|b|c|d|e| @69
|
||||||
|
> +0&&@74
|
||||||
|
|~+0#4040ff13&| @73
|
||||||
|
|~| @73
|
||||||
|
|~| @73
|
||||||
|
|~| @73
|
||||||
|
|~| @73
|
||||||
|
|~| @73
|
||||||
|
|a+3#0000000&|b|c|d|e| @69
|
||||||
|
| +0&&@74
|
@@ -141,4 +141,24 @@ func Test_winbar_not_visible()
|
|||||||
call delete('XtestWinbarNotVisble')
|
call delete('XtestWinbarNotVisble')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
func Test_winbar_not_visible_custom_statusline()
|
||||||
|
CheckScreendump
|
||||||
|
|
||||||
|
let lines =<< trim END
|
||||||
|
split
|
||||||
|
nnoremenu WinBar.Test :test
|
||||||
|
set winminheight=0
|
||||||
|
set statusline=abcde
|
||||||
|
wincmd j
|
||||||
|
wincmd _
|
||||||
|
END
|
||||||
|
call writefile(lines, 'XtestWinbarNotVisble')
|
||||||
|
let buf = RunVimInTerminal('-S XtestWinbarNotVisble', #{rows: 10})
|
||||||
|
call VerifyScreenDump(buf, 'Test_winbar_not_visible_custom_statusline', {})
|
||||||
|
|
||||||
|
" clean up
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
call delete('XtestWinbarNotVisble')
|
||||||
|
endfunction
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2685,
|
||||||
/**/
|
/**/
|
||||||
2684,
|
2684,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user