aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorAbdelhakeem <abdelhakeem.osama@hotmail.com>2019-06-30 20:11:59 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-09-01 21:17:14 +0200
commit7844501c2bb213e7217cdd39ac2000378323e319 (patch)
tree98081021950b586f64e94af88bf1ffd4305af7f1 /runtime
parent9df3a676e7f2302929061a6c0edf42e5fb3f3873 (diff)
downloadrneovim-7844501c2bb213e7217cdd39ac2000378323e319.tar.gz
rneovim-7844501c2bb213e7217cdd39ac2000378323e319.tar.bz2
rneovim-7844501c2bb213e7217cdd39ac2000378323e319.zip
eval: add wait()
closes #10362
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt21
-rw-r--r--runtime/doc/usr_41.txt1
2 files changed, 22 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 897b5df072..f45f99ede2 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2427,6 +2427,8 @@ uniq({list} [, {func} [, {dict}]])
values({dict}) List values in {dict}
virtcol({expr}) Number screen column of cursor or mark
visualmode([expr]) String last visual mode used
+wait({timeout}, {condition}[, {interval}])
+ Number Wait until {condition} is satisfied
wildmenumode() Number whether 'wildmenu' mode is active
win_findbuf({bufnr}) List find windows containing {bufnr}
win_getid([{win} [, {tab}]]) Number get |window-ID| for {win} in {tab}
@@ -8858,6 +8860,25 @@ visualmode([expr]) *visualmode()*
a non-empty String, then the Visual mode will be cleared and
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
+
wildmenumode() *wildmenumode()*
Returns |TRUE| when the wildmenu is active and |FALSE|
otherwise. See 'wildmenu' and 'wildmode'.
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index b26b7cb646..2a2885b4d3 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -959,6 +959,7 @@ Timers: *timer-functions*
timer_stop() stop a timer
timer_stopall() stop all timers
timer_info() get information about timers
+ wait() wait for a condition
Tags: *tag-functions*
taglist() get list of matching tags