diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-11 12:56:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-11 12:56:46 -0700 |
commit | 7652904f79f6e434568e0b8e5946cfcafc9aa767 (patch) | |
tree | 3c5f0f83308102190ed9e3209900b222d17ed808 /runtime | |
parent | c8223e1618c4510f9eff13df509c6da95f869cc6 (diff) | |
download | rneovim-7652904f79f6e434568e0b8e5946cfcafc9aa767.tar.gz rneovim-7652904f79f6e434568e0b8e5946cfcafc9aa767.tar.bz2 rneovim-7652904f79f6e434568e0b8e5946cfcafc9aa767.zip |
eval: wait(): always spin up dummy-timer #10990
This avoids getting "stuck". If user actually _wants_ to get stuck
forever, they could use `:sleep` or specify a really big `interval`.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index f845268333..ec0a28abe8 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -8920,23 +8920,20 @@ visualmode([expr]) *visualmode()* the old value is returned. See |non-zero-arg|. wait({timeout}, {condition}[, {interval}]) *wait()* - Wait until {condition} is satisfied, where {condition} is a - |Funcref| or a |string| containing an expression. - - {timeout} is the maximum number of milliseconds to wait, - -1 means forever. - - By default, the condition is evaluated on user and internal - events. If {interval} is given, the condition is evaluated - every {interval} milliseconds in addition. This can be useful - to guarantee that the function returns when the condition is - satisfied even if the editor is idle. - - Returns one of the following: - * 0 if the condition was satisfied before the timeout - * -1 if the timeout was exceeded - * -2 if the function was interrupted - * -3 if an error occurred + Waits until {condition} evaluates to |TRUE|, where {condition} + is a |Funcref| or |string| containing an expression. + + {timeout} is the maximum waiting time in milliseconds, -1 + means forever. + + Condition is evaluated on user events, internal events, and + every {interval} milliseconds (default: 200). + + Returns a status integer: + 0 if the condition was satisfied before timeout + -1 if the timeout was exceeded + -2 if the function was interrupted (by |CTRL-C|) + -3 if an error occurred wildmenumode() *wildmenumode()* Returns |TRUE| when the wildmenu is active and |FALSE| |