Mercurial > vim
diff runtime/doc/eval.txt @ 14123:583bf95b6c84
Update runtime files.
commit https://github.com/vim/vim/commit/d2f3a8b8787333abf2300d38836b196955f10c00
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 19 14:35:59 2018 +0200
Update runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 19 Jun 2018 14:45:08 +0200 |
parents | d053ec57d886 |
children | de75c249723d |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -5488,6 +5488,20 @@ job_start({command} [, {options}]) *jo The returned Job object can be used to get the status with |job_status()| and stop the job with |job_stop()|. + Note that the job object will be deleted if there are no + references to it. This closes the stdin and stderr, which may + cause the job to fail with an error. To avoid this keep a + reference to the job. Thus instead of: > + call job_start('my-command') +< use: > + let myjob = job_start('my-command') +< and unlet "myjob" once the job is not needed or is past the + point where it would fail (e.g. when it prints a message on + startup). Keep in mind that variables local to a function + will cease to exist if the function returns. Use a + script-local variable if needed: > + let s:myjob = job_start('my-command') +< {options} must be a Dictionary. It can contain many optional items, see |job-options|.