On Tue, Apr 26, 2016 at 09:38:02PM +0200, Bram Moolenaar wrote: > > Lcd wrote: > > > On 26 April 2016, Bram Moolenaar <b...@moolenaar.net> wrote: > > > > > > James McCoy wrote: > > > > Why is Vim injecting "DETACH" into the output? The netbeans code uses > > > > is because that's part of the established protocol, but why is that > > > > being imposed on every other user of channels? > > > > > > Yeah, I was also wondering if we need it. > > > > Some way to test for EOF would be more useful, IMO. Not quite the > > same thing as a close callback.
Why should that be needed? If you get to the point of exit_cb/close_cb being called, all of the output should have been drained already, IMO. > You can now use ch_status() for that. If it returns "open" or > "buffered" there may be more to read. When "closed" then it's done. > > I have added this example in the help: > > func! CloseHandler(channel) > while ch_status(a:channel) == 'buffered' > echomsg ch_read(a:channel) > endwhile > endfunc > let job = job_start(command, {'close_cb': 'CloseHandler'}) Seems like it'd be a lot easier to just define an out_cb instead. Cheers, -- James GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <james...@jamessan.com> -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.