aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-12-15 06:40:55 +0100
committerGitHub <noreply@github.com>2016-12-15 06:40:55 +0100
commit02a9824438adb89eed8b0230068bb95bbf7ce97c (patch)
tree98e15d480351d39e90bb1c5f2102ee22d58da95b /runtime
parentf089d299e33e9f5d1a52aa6d3b9c1ea43bb2e51c (diff)
parentb29c5dd3848d3621dfbb00f8f940506cc1048fd1 (diff)
downloadrneovim-02a9824438adb89eed8b0230068bb95bbf7ce97c.tar.gz
rneovim-02a9824438adb89eed8b0230068bb95bbf7ce97c.tar.bz2
rneovim-02a9824438adb89eed8b0230068bb95bbf7ce97c.zip
Merge #5772 from justinmk/fixsegfault
eval.c: set_selfdict(): Fix invalid memory access.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/job_control.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/doc/job_control.txt b/runtime/doc/job_control.txt
index 5cb172f90a..1aa7ce06d6 100644
--- a/runtime/doc/job_control.txt
+++ b/runtime/doc/job_control.txt
@@ -40,7 +40,7 @@ for details.
Job control is achieved by calling a combination of the |jobstart()|,
|jobsend()| and |jobstop()| functions. Here's an example:
>
- function! s:JobHandler(job_id, data, event)
+ function! s:JobHandler(job_id, data, event) dict
if a:event == 'stdout'
let str = self.shell.' stdout: '.join(a:data)
elseif a:event == 'stderr'
@@ -102,23 +102,23 @@ function. Here's a more object-oriented version of the above:
>
let Shell = {}
- function Shell.on_stdout(job_id, data)
+ function Shell.on_stdout(job_id, data) dict
call append(line('$'), self.get_name().' stdout: '.join(a:data))
endfunction
- function Shell.on_stderr(job_id, data)
+ function Shell.on_stderr(job_id, data) dict
call append(line('$'), self.get_name().' stderr: '.join(a:data))
endfunction
- function Shell.on_exit(job_id, data)
+ function Shell.on_exit(job_id, data) dict
call append(line('$'), self.get_name().' exited')
endfunction
- function Shell.get_name()
+ function Shell.get_name() dict
return 'shell '.self.name
endfunction
- function Shell.new(name, ...)
+ function Shell.new(name, ...) dict
let instance = extend(copy(g:Shell), {'name': a:name})
let argv = ['bash']
if a:0 > 0