diff options
author | Famiu Haque <famiuhaque@protonmail.com> | 2022-05-28 04:57:20 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-28 06:57:20 +0800 |
commit | 826462a8f0923926066da66d8575f6573ee3f079 (patch) | |
tree | afcf355c7d7d3e086859091c5ffc4094cd92e913 /src/nvim | |
parent | e2940d3c79586503c0a645010ae56c7097ca7c3f (diff) | |
download | rneovim-826462a8f0923926066da66d8575f6573ee3f079.tar.gz rneovim-826462a8f0923926066da66d8575f6573ee3f079.tar.bz2 rneovim-826462a8f0923926066da66d8575f6573ee3f079.zip |
fix(ui): require window-local value to show winbar on floating windows (#18773)
Previously, there was a bug where setting the local value of 'winbar' to
itself would cause winbar to appear on a floating window, which is
undesirable. This fix makes it so that it's explicitly required for the
window-local value of 'winbar' for a floating window to be set in order
for winbar to be shown on that window.
Diffstat (limited to 'src/nvim')
-rw-r--r-- | src/nvim/window.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index f42ef874ef..7b49a3b2d8 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -6689,7 +6689,10 @@ static void last_status_rec(frame_T *fr, bool statusline, bool is_stl_global) void set_winbar(void) { FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { - int winbar_height = (*p_wbr != NUL || *wp->w_p_wbr != NUL) ? 1 : 0; + // Require the local value to be set in order to show winbar on a floating window. + int winbar_height = wp->w_floating ? ((*wp->w_p_wbr != NUL) ? 1 : 0) + : ((*p_wbr != NUL || *wp->w_p_wbr != NUL) ? 1 : 0); + if (wp->w_winbar_height != winbar_height) { wp->w_winbar_height = winbar_height; win_set_inner_size(wp); |