diff options
author | Scott Prager <splinterofchaos@gmail.com> | 2014-10-25 21:45:13 -0400 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-11-07 13:34:56 -0300 |
commit | e90973e0359b782a6e3ad4997258d9ca42495c2f (patch) | |
tree | 29527fb1a2227b3d4d27a6665b5eb220dae07dd6 /runtime | |
parent | 37cbafa5bbf01c2619f009bdf876dd4453e9a28a (diff) | |
download | rneovim-e90973e0359b782a6e3ad4997258d9ca42495c2f.tar.gz rneovim-e90973e0359b782a6e3ad4997258d9ca42495c2f.tar.bz2 rneovim-e90973e0359b782a6e3ad4997258d9ca42495c2f.zip |
job: Make v:job_data[2] a list.
Factor out string_to_list() from f_system()'s implementation
and use that to set job_data. This has the technical advantage of
preserving NULs, and may be more convenient for users.
Required for #1176.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/job_control.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/doc/job_control.txt b/runtime/doc/job_control.txt index 49ee3889bc..226244875d 100644 --- a/runtime/doc/job_control.txt +++ b/runtime/doc/job_control.txt @@ -47,9 +47,9 @@ event. The best way to understand is with a complete example: function JobHandler() if v:job_data[1] == 'stdout' - let str = 'shell '. v:job_data[0].' stdout: '.v:job_data[2] + let str = 'shell '. v:job_data[0].' stdout: '.join(v:job_data[2]) elseif v:job_data[1] == 'stderr' - let str = 'shell '.v:job_data[0].' stderr: '.v:job_data[2] + let str = 'shell '.v:job_data[0].' stderr: '.join(v:job_data[2]) else let str = 'shell '.v:job_data[0].' exited' endif @@ -80,8 +80,8 @@ Here's what is happening: following elements: 0: The job id 1: The kind of activity: one of "stdout", "stderr" or "exit" - 2: When "activity" is "stdout" or "stderr", this will contain the data read - from stdout or stderr + 2: When "activity" is "stdout" or "stderr", this will contain a list of + lines read from stdout or stderr To send data to the job's stdin, one can use the |jobsend()| function, like this: |