Skip to content

Commit

Permalink
fix(quickfix): auto_close_when_success false is ignored
Browse files Browse the repository at this point in the history
When the runner/executor is set to `quickfix` and in the options
`auto_close_when_success` is set to false, the quickfix window does not
remain open.

This PR adds the missing check when success code = 0, auto close = false.

The issue is referenced also in the first bullet of
Civitasv#201 (comment)
  • Loading branch information
luxstudio90 committed May 19, 2024
1 parent b221c59 commit 82c3b54
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/cmake-tools/quickfix.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ function _quickfix.run(cmd, env_script, env, args, cwd, opts, on_exit, on_output
_quickfix.close(opts)
end, 100)
end
if code == 0 and not opts.auto_close_when_success then
_quickfix.show(opts)
_quickfix.scroll_to_bottom()
end
if on_exit ~= nil then
on_exit(code)
end
Expand Down

0 comments on commit 82c3b54

Please sign in to comment.