aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/if_lua.txt
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-06-05 11:49:39 +0200
committerGitHub <noreply@github.com>2019-06-05 11:49:39 +0200
commit3305769eae9f556ee731381d166e6955bcbec340 (patch)
treeefe13a5e0a42c0ca7c3589e761925960e15958ed /runtime/doc/if_lua.txt
parent16ee24082f72162d3bdfbddb0b40b5abc2c90fda (diff)
parentb684bd05b513b57b4d67ea2f95f7713c0b18daab (diff)
downloadrneovim-3305769eae9f556ee731381d166e6955bcbec340.tar.gz
rneovim-3305769eae9f556ee731381d166e6955bcbec340.tar.bz2
rneovim-3305769eae9f556ee731381d166e6955bcbec340.zip
Merge pull request #10120 from bfredl/lua_schedule
Add lua function vim.schedule(cb) to defer callbacks to main loop
Diffstat (limited to 'runtime/doc/if_lua.txt')
-rw-r--r--runtime/doc/if_lua.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt
index 92c25ba875..8ee5718349 100644
--- a/runtime/doc/if_lua.txt
+++ b/runtime/doc/if_lua.txt
@@ -379,6 +379,12 @@ vim.stricmp(a, b) *lua-vim.stricmp*
string arguments and returns 0, 1 or -1 if strings are equal, a is
greater then b or a is lesser then b respectively.
+vim.schedule(callback) *lua-vim.schedule*
+ Schedule `callback` to be called soon by the main event loop. This is
+ useful in contexts where some functionality is blocked, like an
+ autocommand or callback running with |textlock|. Then the scheduled
+ callback could invoke this functionality later when it is allowed.
+
vim.type_idx *lua-vim.type_idx*
Type index for use in |lua-special-tbl|. Specifying one of the
values from |lua-vim.types| allows typing the empty table (it is