From 87dfcb2d2126e6778be6a9cb09f9eed0ac878cc4 Mon Sep 17 00:00:00 2001 From: Jan Geboers Date: Wed, 18 Feb 2026 17:01:54 +0100 Subject: [PATCH] Avoid busy-wait in s:system_job() polling loop Add sleep 10m to the job_status polling loop so it yields the CPU instead of spinning at 100% while waiting for the job to finish. --- plug.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plug.vim b/plug.vim index 6a45379..27f1b65 100644 --- a/plug.vim +++ b/plug.vim @@ -2343,6 +2343,7 @@ function! s:system_job(cmd) abort \ 'err_io': 'out', \}) while job_status(job) ==# 'run' + sleep 10m endwhile let s:shell_error = job_info(job).exitval let result = filereadable(tmp) ? join(readfile(tmp, 'b'), "\n") : ''