On Friday, May 13, 2016 at 8:48:13 AM UTC-7, Greg Hurrell wrote:
>
> # Inside Vim now:
> func! CloseHandler(channel)
> while ch_status(a:channel) == 'buffered'
> echomsg ch_read(a:channel)
> endwhile
> endfunc
> job_start('ag --vimgrep foobar',{'close_cb':'CloseHandler'})
Ah, one thing to note. That is partly copy/pasta from the documentation. The
handler I actually ran does no `echomsg`, it just accumulates into a list:
let g:acc=[]
func! CloseHandler(channel)
while ch_status(a:channel) == 'buffered'
call add(g:acc, ch_read(a:channel))
endwhile
endfunc
job_start('ag --vimgrep foobar',{'close_cb':'CloseHandler'})
-Greg
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.