diff options
author | TJ DeVries <devries.timothyj@gmail.com> | 2020-10-06 12:58:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-06 12:58:05 -0400 |
commit | 7b8935398587992da3233bcd7edd79013889fea4 (patch) | |
tree | f84e03987ef24bb3f759e0b90d35b05dca759936 /runtime | |
parent | 07fde6c394ade480d7a435ad1cb730a3fe61be5d (diff) | |
download | rneovim-7b8935398587992da3233bcd7edd79013889fea4.tar.gz rneovim-7b8935398587992da3233bcd7edd79013889fea4.tar.bz2 rneovim-7b8935398587992da3233bcd7edd79013889fea4.zip |
lua: vim.wait allows control of fast events (#13053)
* lua: vim.wait allows control of fast events
* fixup: remove requirement of function for easier waiting
* fixup: lint
* fixup: bfredl comments
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/lua.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 2b638a8539..a53024d420 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -737,13 +737,20 @@ vim.defer_fn({fn}, {timeout}) *vim.defer_fn* Returns: ~ |vim.loop|.new_timer() object -vim.wait({time}, {callback} [, {interval}]) *vim.wait()* +vim.wait({time} [, {callback}, {interval}, {fast_only}]) *vim.wait()* Wait for {time} in milliseconds until {callback} returns `true`. Executes {callback} immediately and at approximately {interval} milliseconds (default 200). Nvim still processes other events during this time. + Parameters: ~ + {time} Number of milliseconds to wait + {callback} Optional callback. Waits until {callback} returns true + {interval} (Approximate) number of milliseconds to wait between polls + {fast_only} If true, only |api-fast| events will be processed. + If called from while in an |api-fast| event, will + automatically be set to `true`. Returns: ~ If {callback} returns `true` during the {time}: |