Skip to content

Commit 81b5e0a

Browse files
committed
Fix invalid channel usage when job is dead
This makes the plugin more resistant in a fatal scenario.
1 parent f27b7c8 commit 81b5e0a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

autoload/tpipeline.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,10 @@ endfunc
342342
func tpipeline#job_state()
343343
let res = ""
344344
if s:is_nvim
345-
let pid = jobpid(s:job)
345+
let pid = 0
346+
if s:exit_code < 0
347+
let pid = jobpid(s:job)
348+
endif
346349
let res = pid ? "run as PID " . pid : "dead"
347350
else
348351
let res = job_status(s:job)

0 commit comments

Comments
 (0)