Skywind wrote:

> Bram Moolenaar wrote´╝Ü
> 
> > You can improve this a lot by changing:
> > 
> >    if ch_canread(ch)
> >         let text = ch_read(ch, {'timeout':0})
> >         caddexpr text
> >         cbottom
> >     endif
> > 
> > To:
> > 
> >    if ch_canread(ch)
> >     while ch_canread(ch)
> >             let text = ch_read(ch, {'timeout':0})
> >             caddexpr text
> >     endwhile
> >     cbottom
> >     endif
> 
> Yes, I intentionally do so to make reading really slower than writing.
> 
> > But, you might still miss some messages if the job exits early.
> > 
> > I suppose we will need to add an option to tell Vim that you will read
> > the messages, not using a callback.  I think this should do it:
> > 
> > "drop"              Specifies when to drop messages:
> >                 "auto"      When there is no callback to handle a message.
> >                             The "close_cb" is also considered for this.
> >                 "never"     All messages will be kept.
> > 
> 
> It's very nice if I can have the "drop" option in job_start !

Should work with patch 8.0.0107.  Took a bit of debugging to figure out
why the channel was reported as being closed.  I thought messages were
being dropped somewhere, but it turned out to be a problem with
ch_canread().

-- 
hundred-and-one symptoms of being an internet addict:
65. The last time you looked at the clock it was 11:30pm, and in what
    seems like only a few seconds later, your sister runs past you to
    catch her 7am school bus.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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.

Raspunde prin e-mail lui