@@ -398,6 +398,7 @@ static void f_strdisplaywidth(typval_T *argvars, typval_T *rettv);
398398static void f_strwidth (typval_T * argvars , typval_T * rettv );
399399static void f_submatch (typval_T * argvars , typval_T * rettv );
400400static void f_substitute (typval_T * argvars , typval_T * rettv );
401+ static void f_swapinfo (typval_T * argvars , typval_T * rettv );
401402static void f_synID (typval_T * argvars , typval_T * rettv );
402403static void f_synIDattr (typval_T * argvars , typval_T * rettv );
403404static void f_synIDtrans (typval_T * argvars , typval_T * rettv );
@@ -463,6 +464,7 @@ static void f_win_screenpos(typval_T *argvars, typval_T *rettv);
463464static void f_winbufnr (typval_T * argvars , typval_T * rettv );
464465static void f_wincol (typval_T * argvars , typval_T * rettv );
465466static void f_winheight (typval_T * argvars , typval_T * rettv );
467+ static void f_winlayout (typval_T * argvars , typval_T * rettv );
466468static void f_winline (typval_T * argvars , typval_T * rettv );
467469static void f_winnr (typval_T * argvars , typval_T * rettv );
468470static void f_winrestcmd (typval_T * argvars , typval_T * rettv );
@@ -858,6 +860,7 @@ static struct fst
858860 {"strwidth" , 1 , 1 , f_strwidth },
859861 {"submatch" , 1 , 2 , f_submatch },
860862 {"substitute" , 4 , 4 , f_substitute },
863+ {"swapinfo" , 1 , 1 , f_swapinfo },
861864 {"synID" , 3 , 3 , f_synID },
862865 {"synIDattr" , 2 , 3 , f_synIDattr },
863866 {"synIDtrans" , 1 , 1 , f_synIDtrans },
@@ -952,6 +955,7 @@ static struct fst
952955 {"winbufnr" , 1 , 1 , f_winbufnr },
953956 {"wincol" , 0 , 0 , f_wincol },
954957 {"winheight" , 1 , 1 , f_winheight },
958+ {"winlayout" , 0 , 1 , f_winlayout },
955959 {"winline" , 0 , 0 , f_winline },
956960 {"winnr" , 0 , 1 , f_winnr },
957961 {"winrestcmd" , 0 , 0 , f_winrestcmd },
@@ -12342,6 +12346,16 @@ f_substitute(typval_T *argvars, typval_T *rettv)
1234212346 rettv -> vval .v_string = do_string_sub (str , pat , sub , expr , flg );
1234312347}
1234412348
12349+ /*
12350+ * "swapinfo(swap_filename)" function
12351+ */
12352+ static void
12353+ f_swapinfo (typval_T * argvars , typval_T * rettv )
12354+ {
12355+ if (rettv_dict_alloc (rettv ) == OK )
12356+ get_b0_dict (get_tv_string (argvars ), rettv -> vval .v_dict );
12357+ }
12358+
1234512359/*
1234612360 * "synID(lnum, col, trans)" function
1234712361 */
@@ -13773,6 +13787,29 @@ f_winheight(typval_T *argvars, typval_T *rettv)
1377313787 rettv -> vval .v_number = wp -> w_height ;
1377413788}
1377513789
13790+ /*
13791+ * "winlayout()" function
13792+ */
13793+ static void
13794+ f_winlayout (typval_T * argvars , typval_T * rettv )
13795+ {
13796+ tabpage_T * tp ;
13797+
13798+ if (rettv_list_alloc (rettv ) != OK )
13799+ return ;
13800+
13801+ if (argvars [0 ].v_type == VAR_UNKNOWN )
13802+ tp = curtab ;
13803+ else
13804+ {
13805+ tp = find_tabpage ((int )get_tv_number (& argvars [0 ]));
13806+ if (tp == NULL )
13807+ return ;
13808+ }
13809+
13810+ get_framelayout (tp -> tp_topframe , rettv -> vval .v_list , TRUE);
13811+ }
13812+
1377613813/*
1377713814 * "winline()" function
1377813815 */
0 commit comments