赵启明赵 wrote:

> I've tried these simple code for job control
> 
> let job = job_start('echo abc', {'waittime': 1})
> let channel = job_getchannel(job)
> let output = ch_readraw(channel)
> call setline(1, output)
> 
> And I got NULL character inserted at the end of first line, I thought
> is should be trimmed by vim.

The NL format hasn't really been implemented yet.  Just about to get on it
(the Netbeans code can be used).

Since the trailing NL isn't stripped from a RAW message and in Vim a NL
stands for NUL byte, that's what you get.

I suppose we can strip the NL when the channel is in NL format.

-- 
Edison's greatest achievement came in 1879, when he invented the
electric company.  Edison's design was a brilliant adaptation of the
simple electrical circuit: the electric company sends electricity
through a wire to a customer, then immediately gets the electricity
back through another wire

 /// Bram Moolenaar -- [email protected] -- 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui