mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 14:26:07 +00:00
feat(api): nvim_open_win() relative to tabline and laststatus #32006
Problem: Anchoring a floating window to the tabline and laststatus is cumbersome; requiring autocommands and looping over all windows/tabpages. Solution: Add new "tabline" and "laststatus" options to the `relative` field of nvim_open_win() to place a window relative to.
This commit is contained in:
@@ -307,6 +307,15 @@ void win_check_anchored_floats(win_T *win)
|
||||
}
|
||||
}
|
||||
|
||||
void win_float_anchor_laststatus(void)
|
||||
{
|
||||
FOR_ALL_WINDOWS_IN_TAB(win, curtab) {
|
||||
if (win->w_config.relative == kFloatRelativeLaststatus) {
|
||||
win->w_pos_changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void win_reconfig_floats(void)
|
||||
{
|
||||
for (win_T *wp = lastwin; wp && wp->w_floating; wp = wp->w_prev) {
|
||||
|
Reference in New Issue
Block a user