Skip to content

Commit

Permalink
Fix invalid channel usage when job is dead
Browse files Browse the repository at this point in the history
This makes the plugin more resistant in a fatal scenario.
  • Loading branch information
vimpostor committed Aug 15, 2023
1 parent f27b7c8 commit 81b5e0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autoload/tpipeline.vim
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,10 @@ endfunc
func tpipeline#job_state()
let res = ""
if s:is_nvim
let pid = jobpid(s:job)
let pid = 0
if s:exit_code < 0
let pid = jobpid(s:job)
endif
let res = pid ? "run as PID " . pid : "dead"
else
let res = job_status(s:job)
Expand Down

0 comments on commit 81b5e0a

Please sign in to comment.