Skip to content

Commit 87944a5

Browse files
DemiDroLlceWolf
authored andcommitted
vimux: simplify exit handling by always returning success
The previous implementation relied on terminal.handle_exit(), which expected lock and exit_code files to be created. Vimux does not support this workflow, causing errors when trying to handle exit codes. This change removes the dependency on terminal.handle_exit() and instead always calls on_exit(0) if provided, treating every run as successful.
1 parent 88e07c6 commit 87944a5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lua/cmake-tools/vimux.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
local terminal = require("cmake-tools.terminal")
21
local osys = require("cmake-tools.osys")
32
local utils = require("cmake-tools.utils")
4-
---@class vimux : terminal
3+
4+
---@class vimux : executor, runner
55
local _vimux = {
66
id = nil,
77
}
@@ -17,7 +17,9 @@ end
1717
function _vimux.run(cmd, env_script, env, args, cwd, opts, on_exit, on_output)
1818
local full_cmd = _vimux.prepare_cmd_for_run(cmd, env, args, cwd)
1919
vim.fn.VimuxRunCommand(full_cmd)
20-
terminal.handle_exit(opts, on_exit, opts.close_on_exit)
20+
if type(on_exit) == "function" then
21+
on_exit(0) -- vimux does not provide exit codes, assume success
22+
end
2123
end
2224

2325
function _vimux.has_active_job(opts)

0 commit comments

Comments
 (0)