mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
vim-patch:8.1.0307: there is no good way to get the window layout
Problem: There is no good way to get the window layout.
Solution: Add the winlayout() function. (Yegappan Lakshmanan)
0f6b4f06de
This commit is contained in:
@@ -17872,6 +17872,25 @@ static void f_winheight(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
}
|
||||
}
|
||||
|
||||
// "winlayout()" function
|
||||
static void f_winlayout(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
{
|
||||
tabpage_T *tp;
|
||||
|
||||
tv_list_alloc_ret(rettv, 2);
|
||||
|
||||
if (argvars[0].v_type == VAR_UNKNOWN) {
|
||||
tp = curtab;
|
||||
} else {
|
||||
tp = find_tabpage((int)tv_get_number(&argvars[0]));
|
||||
if (tp == NULL) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
get_framelayout(tp->tp_topframe, rettv->vval.v_list, true);
|
||||
}
|
||||
|
||||
/*
|
||||
* "winline()" function
|
||||
*/
|
||||
|
Reference in New Issue
Block a user