Mercurial > vim
comparison runtime/doc/channel.txt @ 9147:053bc64433ec v7.4.1857
commit https://github.com/vim/vim/commit/9f5842e63fc63d438cbffcec503e072a06f74dc2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 29 16:17:08 2016 +0200
patch 7.4.1857
Problem: When a channel appends to a buffer that is 'nomodifiable' there is
an error but appending is done anyway.
Solution: Add the 'modifiable' option. Refuse to write to a 'nomodifiable'
when the value is 1.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 29 May 2016 16:30:06 +0200 |
parents | bc38030aec7d |
children | ecb621205ed1 |
comparison
equal
deleted
inserted
replaced
9146:23a544d11064 | 9147:053bc64433ec |
---|---|
1 *channel.txt* For Vim version 7.4. Last change: 2016 May 24 | 1 *channel.txt* For Vim version 7.4. Last change: 2016 May 29 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
576 "close_cb" on ch_open(). | 576 "close_cb" on ch_open(). |
577 *job-exit_cb* | 577 *job-exit_cb* |
578 "exit_cb": handler Callback for when the job ends. The arguments are the | 578 "exit_cb": handler Callback for when the job ends. The arguments are the |
579 job and the exit status. | 579 job and the exit status. |
580 Vim checks about every 10 seconds for jobs that ended. | 580 Vim checks about every 10 seconds for jobs that ended. |
581 The callback can also be triggered by calling | 581 The check also be triggered by calling |job_status()|, |
582 |job_status()|. | 582 which may then invoke the exit_cb handler. |
583 Note that data can be buffered, callbacks may still be | 583 Note that data can be buffered, callbacks may still be |
584 called after the process ends. | 584 called after the process ends. |
585 *job-timeout* | 585 *job-timeout* |
586 "timeout" The time to wait for a request when blocking, E.g. | 586 "timeout" The time to wait for a request when blocking, E.g. |
587 when using ch_evalexpr(). In milliseconds. The | 587 when using ch_evalexpr(). In milliseconds. The |
623 | 623 |
624 *job-out_io* *out_name* *out_buf* | 624 *job-out_io* *out_name* *out_buf* |
625 "out_io": "null" disconnect stdout (goes to /dev/null) | 625 "out_io": "null" disconnect stdout (goes to /dev/null) |
626 "out_io": "pipe" stdout is connected to the channel (default) | 626 "out_io": "pipe" stdout is connected to the channel (default) |
627 "out_io": "file" stdout writes to a file | 627 "out_io": "file" stdout writes to a file |
628 "out_io": "buffer" stdout appends to a buffer | 628 "out_io": "buffer" stdout appends to a buffer (see below) |
629 "out_name": "/path/file" the name of the file or buffer to write to | 629 "out_name": "/path/file" the name of the file or buffer to write to |
630 "out_buf": number the number of the buffer to write to | 630 "out_buf": number the number of the buffer to write to |
631 "out_modifiable": 0 when writing to a buffer, 'modifiable' will be off | |
632 (see below) | |
631 | 633 |
632 *job-err_io* *err_name* *err_buf* | 634 *job-err_io* *err_name* *err_buf* |
633 "err_io": "out" stderr messages to go to stdout | 635 "err_io": "out" stderr messages to go to stdout |
634 "err_io": "null" disconnect stderr (goes to /dev/null) | 636 "err_io": "null" disconnect stderr (goes to /dev/null) |
635 "err_io": "pipe" stderr is connected to the channel (default) | 637 "err_io": "pipe" stderr is connected to the channel (default) |
636 "err_io": "file" stderr writes to a file | 638 "err_io": "file" stderr writes to a file |
637 "err_io": "buffer" stderr appends to a buffer | 639 "err_io": "buffer" stderr appends to a buffer (see below) |
638 "err_name": "/path/file" the name of the file or buffer to write to | 640 "err_name": "/path/file" the name of the file or buffer to write to |
639 "err_buf": number the number of the buffer to write to | 641 "err_buf": number the number of the buffer to write to |
642 "err_modifiable": 0 when writing to a buffer, 'modifiable' will be off | |
643 (see below) | |
640 | 644 |
641 "block_write": number only for testing: pretend every other write to stdin | 645 "block_write": number only for testing: pretend every other write to stdin |
642 will block | 646 will block |
643 | 647 |
644 | 648 |
661 used to get the buffer number. | 665 used to get the buffer number. |
662 | 666 |
663 For a new buffer 'buftype' is set to "nofile" and 'bufhidden' to "hide". If | 667 For a new buffer 'buftype' is set to "nofile" and 'bufhidden' to "hide". If |
664 you prefer other settings, create the buffer first and pass the buffer number. | 668 you prefer other settings, create the buffer first and pass the buffer number. |
665 | 669 |
670 The "out_modifiable" and "err_modifiable" options can be used to set the | |
671 'modifiable' option off, or write to a buffer that has 'modifiable' off. That | |
672 means that lines will be appended to the buffer, but the user can't easily | |
673 change the buffer. | |
674 | |
675 When an existing buffer is to be written where 'modifiable' is off and the | |
676 "out_modifiable" or "err_modifiable" options is not zero, an error is given | |
677 and the buffer will not be written to. | |
678 | |
666 When the buffer written to is displayed in a window and the cursor is in the | 679 When the buffer written to is displayed in a window and the cursor is in the |
667 first column of the last line, the cursor will be moved to the newly added | 680 first column of the last line, the cursor will be moved to the newly added |
668 line and the window is scrolled up to show the cursor if needed. | 681 line and the window is scrolled up to show the cursor if needed. |
669 | 682 |
670 Undo is synced for every added line. | 683 Undo is synced for every added line. |