Skip to content

Commit ba152bf

Browse files
committed
fixup! Async.Promise: Fix/brush up the help document
1 parent 2c64b59 commit ba152bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/vital/Async/Promise.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ Before explaining the detail of APIs, let's see actual examples.
101101
let s:Promise = vital#vital#import('Async.Promise')
102102
103103
function! s:read(chan, part) abort
104-
let out = ''
104+
let out = []
105105
while ch_status(a:chan, {'part' : a:part}) =~# 'open\|buffered'
106-
let out .= ch_read(a:chan, {'part' : a:part}) . "\n"
106+
call add(out, ch_read(a:chan, {'part' : a:part}))
107107
endwhile
108-
return out
108+
return join(out, "\n")
109109
endfunction
110110
111111
function! s:sh(...) abort

0 commit comments

Comments
 (0)