aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/api.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/api.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/api.txt')
-rw-r--r--runtime/doc/api.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index e127ccae0c..a529a9b32e 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -203,6 +203,8 @@ User reloads the buffer with ":edit", emits: >
In-process lua plugins can also recieve buffer updates, in the form of lua
callbacks. These callbacks are called frequently in various contexts, buffer
contents or window layout should not be changed inside these |textlock|.
+|lua-vim.schedule| can be used to defer these operations to the main loop,
+where they are allowed.
|nvim_buf_attach| will take keyword args for the callbacks. "on_lines" will
receive parameters ("lines", {buf}, {changedtick}, {firstline}, {lastline}, {new_lastline}).