diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-04-01 16:16:18 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-04-01 16:16:18 +0200 |
commit | 49c51b825a7435a750e64f7f0ebd09166e8559df (patch) | |
tree | 6618c763a83c3c48975a3be908c30594f487d257 /src | |
parent | 5c504f680e63120fea36becfabb8d939d4449e34 (diff) |
patch 8.2.2685: custom statusline not drawn correctly with WinBarv8.2.2685
Problem: Custom statusline not drawn correctly with WinBar.
Solution: Also adjust the column for the custom status line. (Yee Cheng
Chin, closes #8047)
Diffstat (limited to 'src')
-rw-r--r-- | src/drawscreen.c | 2 | ||||
-rw-r--r-- | src/proto/drawscreen.pro | 1 | ||||
-rw-r--r-- | src/screen.c | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_winbar_not_visible_custom_statusline.dump | 10 | ||||
-rw-r--r-- | src/testdir/test_winbar.vim | 20 | ||||
-rw-r--r-- | src/version.c | 2 |
6 files changed, 35 insertions, 2 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c index 051d94b232..0e36e79173 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -380,7 +380,7 @@ update_screen(int type_arg) /* * Return the row for drawing the statusline and the ruler of window "wp". */ - static int + int statusline_row(win_T *wp) { #if defined(FEAT_PROP_POPUP) diff --git a/src/proto/drawscreen.pro b/src/proto/drawscreen.pro index 7414fa0936..528c8b2192 100644 --- a/src/proto/drawscreen.pro +++ b/src/proto/drawscreen.pro @@ -1,5 +1,6 @@ /* drawscreen.c */ int update_screen(int type_arg); +int statusline_row(win_T *wp); void showruler(int always); void win_redr_ruler(win_T *wp, int always, int ignore_pum); void after_updating_screen(int may_resize_shell); diff --git a/src/screen.c b/src/screen.c index d219b13c38..9d5d4df98c 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1248,7 +1248,7 @@ win_redr_custom( } else { - row = W_WINROW(wp) + wp->w_height; + row = statusline_row(wp); fillchar = fillchar_status(&attr, wp); maxwidth = wp->w_width; diff --git a/src/testdir/dumps/Test_winbar_not_visible_custom_statusline.dump b/src/testdir/dumps/Test_winbar_not_visible_custom_statusline.dump new file mode 100644 index 0000000000..9eff5ba3e0 --- /dev/null +++ b/src/testdir/dumps/Test_winbar_not_visible_custom_statusline.dump @@ -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 diff --git a/src/testdir/test_winbar.vim b/src/testdir/test_winbar.vim index 2cbdd013c4..92da3128f6 100644 --- a/src/testdir/test_winbar.vim +++ b/src/testdir/test_winbar.vim @@ -141,4 +141,24 @@ func Test_winbar_not_visible() call delete('XtestWinbarNotVisble') 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 diff --git a/src/version.c b/src/version.c index 943a6f6016..8a6e1642a6 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2685, +/**/ 2684, /**/ 2683, |