From 84bbe4b0ca935db1f6202db339aee5594a3b3908 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 21 Nov 2023 11:24:30 +0000 Subject: fix(lua): disallow vim.wait() in fast contexts `vim.wait()` cannot be called in a fast callback since the main loop cannot be run in that context as it is not reentrant Fixes #26122 --- runtime/lua/vim/_editor.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim/_editor.lua') diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua index 12b632075d..6cccbe8313 100644 --- a/runtime/lua/vim/_editor.lua +++ b/runtime/lua/vim/_editor.lua @@ -124,7 +124,8 @@ vim.log = { --- @return vim.SystemObj Object with the fields: --- - pid (integer) Process ID --- - wait (fun(timeout: integer|nil): SystemCompleted) Wait for the process to complete. Upon ---- timeout the process is sent the KILL signal (9) and the exit code is set to 124. +--- timeout the process is sent the KILL signal (9) and the exit code is set to 124. Cannot +--- be called in |api-fast|. --- - SystemCompleted is an object with the fields: --- - code: (integer) --- - signal: (integer) -- cgit