mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
fix(vim.ui): open() may wait indefinitely #28325
Problem: vim.ui.open "locks up" Nvim if the spawned process does not terminate. #27986 Solution: - Change `vim.ui.open()`: - Do not call `wait()`. - Return a `SystemObj`. The caller can decide if it wants to `wait()`. - Change `gx` to `wait()` only a short time. - Allows `gx` to show a message if the command fails, without the risk of waiting forever.
This commit is contained in:
@ -121,6 +121,7 @@ vim.log = {
|
||||
--- asynchronously. Receives SystemCompleted object, see return of SystemObj:wait().
|
||||
---
|
||||
--- @return vim.SystemObj Object with the fields:
|
||||
--- - cmd (string[]) Command name and args
|
||||
--- - 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. Cannot
|
||||
|
Reference in New Issue
Block a user