mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 02:08:17 +00:00
fix(winbar): fix winbar disappear or glitch when moving a split (#18775)
This commit is contained in:
@@ -1334,7 +1334,6 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir)
|
|||||||
set_fraction(oldwin);
|
set_fraction(oldwin);
|
||||||
}
|
}
|
||||||
wp->w_fraction = oldwin->w_fraction;
|
wp->w_fraction = oldwin->w_fraction;
|
||||||
wp->w_winbar_height = oldwin->w_winbar_height;
|
|
||||||
|
|
||||||
if (flags & WSP_VERT) {
|
if (flags & WSP_VERT) {
|
||||||
wp->w_p_scr = curwin->w_p_scr;
|
wp->w_p_scr = curwin->w_p_scr;
|
||||||
@@ -1571,6 +1570,8 @@ static void win_init(win_T *newp, win_T *oldp, int flags)
|
|||||||
copyFoldingState(oldp, newp);
|
copyFoldingState(oldp, newp);
|
||||||
|
|
||||||
win_init_some(newp, oldp);
|
win_init_some(newp, oldp);
|
||||||
|
|
||||||
|
newp->w_winbar_height = oldp->w_winbar_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -459,4 +459,40 @@ describe('winbar', function()
|
|||||||
|
|
|
|
||||||
]]}
|
]]}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('works correctly when moving a split', function()
|
||||||
|
screen:try_resize(45, 6)
|
||||||
|
command('set winbar=')
|
||||||
|
command('vsplit')
|
||||||
|
command('setlocal winbar=foo')
|
||||||
|
screen:expect([[
|
||||||
|
{1:foo }│ |
|
||||||
|
^ │{3:~ }|
|
||||||
|
{3:~ }│{3:~ }|
|
||||||
|
{3:~ }│{3:~ }|
|
||||||
|
{4:[No Name] }{2:[No Name] }|
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
|
||||||
|
command('wincmd L')
|
||||||
|
screen:expect([[
|
||||||
|
│{1:foo }|
|
||||||
|
{3:~ }│^ |
|
||||||
|
{3:~ }│{3:~ }|
|
||||||
|
{3:~ }│{3:~ }|
|
||||||
|
{2:[No Name] }{4:[No Name] }|
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
|
||||||
|
command('wincmd w')
|
||||||
|
command('wincmd L')
|
||||||
|
screen:expect([[
|
||||||
|
{1:foo }│^ |
|
||||||
|
│{3:~ }|
|
||||||
|
{3:~ }│{3:~ }|
|
||||||
|
{3:~ }│{3:~ }|
|
||||||
|
{2:[No Name] }{4:[No Name] }|
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user