Mercurial > vim
diff runtime/doc/channel.txt @ 8291:ac0c43e7af20 v7.4.1438
commit https://github.com/vim/vim/commit/c7f0ebc6d1e1cdaed816b88a0d6092c5ace615eb
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 27 21:10:09 2016 +0100
patch 7.4.1438
Problem: Can't get buffer number of a channel.
Solution: Add ch_getbufnr().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 27 Feb 2016 21:15:04 +0100 |
parents | e05e28dcb590 |
children | 1bf1b88968a2 |
line wrap: on
line diff
--- a/runtime/doc/channel.txt +++ b/runtime/doc/channel.txt @@ -561,11 +561,14 @@ TODO: *job-term* When the IO mode is "buffer" and there is a callback, the text is appended to the buffer before invoking the callback. - *E915* + The name of the buffer is compared the full name of existing buffers. If -there is a match that buffer is used. Otherwise a new buffer is created, -where 'buftype' is set to "nofile" and 'bufhidden' to "hide". If you prefer -other settings, create the buffer first and pass the buffer number. +there is a match that buffer is used. Otherwise a new buffer is created. +Use an empty name to always create a new buffer. |ch_getbufnr()| can then be +used to get the buffer number. + +For a new buffer 'buftype' is set to "nofile" and 'bufhidden' to "hide". If +you prefer other settings, create the buffer first and pass the buffer number. When the buffer written to is displayed in a window and the cursor is in the first column of the last line, the cursor will be moved to the newly added