aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 86f57ee5a2..17057ea28d 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -10310,6 +10310,15 @@ static void f_getwininfo(typval_T *argvars, typval_T *rettv, FunPtr fptr)
}
}
+// "win_screenpos()" function
+static void f_win_screenpos(typval_T *argvars, typval_T *rettv, FunPtr fptr)
+{
+ tv_list_alloc_ret(rettv, 2);
+ const win_T *const wp = find_win_by_nr(&argvars[0], NULL);
+ tv_list_append_number(rettv->vval.v_list, wp == NULL ? 0 : wp->w_winrow + 1);
+ tv_list_append_number(rettv->vval.v_list, wp == NULL ? 0 : wp->w_wincol + 1);
+}
+
/*
* "getwinposx()" function
*/