mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
vim-patch:8.0.1334: splitting a window with a WinBar damages window layout
Problem: Splitting a window with a WinBar damages window layout.
(Lifepillar)
Solution: Take the winbar into account when computing the new window
position. Add WINBAR_HEIGHT().
3167c3e701
This commit is contained in:
@@ -1472,8 +1472,9 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir)
|
||||
wp->w_winrow = oldwin->w_winrow;
|
||||
wp->w_status_height = STATUS_HEIGHT;
|
||||
oldwin->w_winrow += wp->w_height + STATUS_HEIGHT;
|
||||
} else { /* new window below current one */
|
||||
wp->w_winrow = oldwin->w_winrow + oldwin->w_height + STATUS_HEIGHT;
|
||||
} else { // new window below current one
|
||||
wp->w_winrow = oldwin->w_winrow + oldwin->w_height
|
||||
+ STATUS_HEIGHT + oldwin->w_winbar_height;
|
||||
wp->w_status_height = oldwin->w_status_height;
|
||||
if (!(flags & WSP_BOT)) {
|
||||
oldwin->w_status_height = STATUS_HEIGHT;
|
||||
|
Reference in New Issue
Block a user