diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-08-05 13:59:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-05 13:59:40 +0200 |
commit | f5d1e0e7b1837e8b76f1561167543c90a9942a7a (patch) | |
tree | ae871874930fc44d4269c9c01eb7827da20998bc /runtime/doc | |
parent | 51440204e7973672f906db8e53035cfd228ce444 (diff) | |
parent | 88938634e7418ced4cfb074c48867523460dcc84 (diff) | |
download | rneovim-f5d1e0e7b1837e8b76f1561167543c90a9942a7a.tar.gz rneovim-f5d1e0e7b1837e8b76f1561167543c90a9942a7a.tar.bz2 rneovim-f5d1e0e7b1837e8b76f1561167543c90a9942a7a.zip |
Merge pull request #10690 from bfredl/lua_print
lua: laundry list (crashes and additions)
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/if_lua.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt index f886fd28c5..7ddcb6cc92 100644 --- a/runtime/doc/if_lua.txt +++ b/runtime/doc/if_lua.txt @@ -400,7 +400,8 @@ is safe to execute API methods. > end)) A subset of the API is available in direct luv callbacks ("fast" callbacks), -most notably |nvim_get_mode()| and |nvim_input()|. +most notably |nvim_get_mode()| and |nvim_input()|. It is possible to +check whether code is running in this context using |vim.in_fast_event()|. Example: repeating timer @@ -462,6 +463,14 @@ vim.schedule({callback}) *vim.schedule()* Schedules {callback} to be invoked soon by the main event-loop. Useful to avoid |textlock| or other temporary restrictions. +vim.in_fast_event() *vim.in_fast_event()* + Returns true if the code is executing as part of a "fast" event + handler, where most of the API is disabled. These are low-level event + such as luv callbacks |lua-loop-callbacks|, which can be invoked at + any time nvim polls for input. When this returns `false` most API + functions are callable, but can be subjected to other restrictions, + such as |textlock|. + vim.type_idx *vim.type_idx* Type index for use in |lua-special-tbl|. Specifying one of the values from |vim.types| allows typing the empty table (it is |