refactor(vim.system): factor out on_exit handling

This commit is contained in:
Lewis Russell
2023-09-04 12:03:03 +01:00
parent 6d5f12efd2
commit 80d1333b73
6 changed files with 87 additions and 73 deletions

View File

@@ -117,7 +117,7 @@ vim.log = {
--- @param on_exit (function|nil) Called when subprocess exits. When provided, the command runs
--- asynchronously. Receives SystemCompleted object, see return of SystemObj:wait().
---
--- @return SystemObj Object with the fields:
--- @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.