diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-04-29 05:53:44 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-04-29 11:53:44 +0200 |
commit | a0d723db55cf2b81e3bd9271cda9b1b58a5c9f3c (patch) | |
tree | d06365a7b15b5a4179ac6b60da5ef52fb87d1407 /src | |
parent | 8aca932aa0ace29a11b2036f882c961b33ab5286 (diff) | |
download | rneovim-a0d723db55cf2b81e3bd9271cda9b1b58a5c9f3c.tar.gz rneovim-a0d723db55cf2b81e3bd9271cda9b1b58a5c9f3c.tar.bz2 rneovim-a0d723db55cf2b81e3bd9271cda9b1b58a5c9f3c.zip |
vim-patch:8.0.1563: getwinposx() timeout #9955
Problem: Timeout of getwinposx() can be too short. (lilydjwg)
Solution: Add getwinpos(). (closes vim/vim#2689)
https://github.com/vim/vim/commit/3f54fd319f6641b4bed478bcc90cdb39ede68e31
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 8 | ||||
-rw-r--r-- | src/nvim/eval.lua | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index c7d4e32739..19324acd5c 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -10474,6 +10474,14 @@ static void f_win_screenpos(typval_T *argvars, typval_T *rettv, FunPtr fptr) tv_list_append_number(rettv->vval.v_list, wp == NULL ? 0 : wp->w_wincol + 1); } +// "getwinpos({timeout})" function +static void f_getwinpos(typval_T *argvars, typval_T *rettv, FunPtr fptr) +{ + tv_list_alloc_ret(rettv, 2); + tv_list_append_number(rettv->vval.v_list, -1); + tv_list_append_number(rettv->vval.v_list, -1); +} + /* * "getwinposx()" function */ diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index b7525ee49b..7978044200 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -143,6 +143,7 @@ return { gettabvar={args={2, 3}}, gettabwinvar={args={3, 4}}, getwininfo={args={0, 1}}, + getwinpos={args={0, 1}}, getwinposx={}, getwinposy={}, getwinvar={args={2, 3}}, |