Skip to content

Commit 33c7532

Browse files
authored
Merge pull request #2551 from h-east/update-terminal
Update terminal.{txt,jax}
2 parents 1720cf0 + ab356bd commit 33c7532

2 files changed

Lines changed: 41 additions & 8 deletions

File tree

doc/terminal.jax

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*terminal.txt* For Vim バージョン 9.2. Last change: 2026 Mar 12
1+
*terminal.txt* For Vim バージョン 9.2. Last change: 2026 Apr 02
22

33

44
VIM リファレンスマニュアル by Bram Moolenaar
@@ -927,9 +927,25 @@ term_start({cmd} [, {options}]) *term_start()*
927927
"in_io", "in_top", "in_bot", "in_name", "in_buf"
928928
"out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
929929
"err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
930-
しなかしながら、少なくとも stdin、stdout もしくは stderr のう
931-
ち 1 つは端末に接続されていなければならない。I/O が端末に接続
932-
されているとき、その部分のコールバック機能は使用されない。
930+
Unix の場合:
931+
端末との双方向通信が必要なため、stdin、stdout、stderrはデフォ
932+
ルトで pty に接続される。"out_cb" を設定しても、stdout は pty
933+
から pipe に切り替わらない。"err_cb" を設定した場合のみ、stderr
934+
が pipe に切り替わる。
935+
Note: pty は行バッファリングされ、pipe はブロックバッファリン
936+
グされるため、stdout と stderr の出力順序は保持されない場合が
937+
ある。"err_cb" を指定しない場合、stderr は stdout と同じ pty
938+
を使用するため、出力順序は保持されるが、stdout と stderr を区
939+
別することはできない。
940+
941+
MS-Windows で |ConPTY| を使用する場合:
942+
stdin、stdout、stderr は、コールバックの設定に関係なく、常に
943+
pipe を介して擬似コンソールに接続される。
944+
stdout と stderr は同じパイプを共有しているため、"err_cb" で分
945+
離することはできない。
946+
これは、CreatePseudoConsole() API が入力ハンドルと出力ハンドル
947+
をそれぞれ 1 つずつしか受け付けず、標準エラー出力用の個別のハ
948+
ンドルがないためである。
933949

934950
追加のオプションは以下のとおり:
935951
"term_name" (コマンド名の代わりに使用される)バッファ

en/terminal.txt

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*terminal.txt* For Vim version 9.2. Last change: 2026 Mar 12
1+
*terminal.txt* For Vim version 9.2. Last change: 2026 Apr 02
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -944,9 +944,26 @@ term_start({cmd} [, {options}]) *term_start()*
944944
"in_io", "in_top", "in_bot", "in_name", "in_buf"
945945
"out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
946946
"err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
947-
However, at least one of stdin, stdout or stderr must be
948-
connected to the terminal. When I/O is connected to the
949-
terminal then the callback function for that part is not used.
947+
On Unix:
948+
stdin, stdout, and stderr are connected to a pty by default,
949+
since bidirectional communication with the terminal is
950+
required. Setting "out_cb" does not switch stdout from the
951+
pty to a pipe. Only setting "err_cb" switches stderr to a
952+
pipe.
953+
Note: Since a pty is line-buffered and a pipe is
954+
block-buffered, the order of output between stdout and stderr
955+
may not be preserved. Without "err_cb", stderr uses the same
956+
pty as stdout, so the output order is preserved but stdout and
957+
stderr cannot be distinguished.
958+
959+
On MS-Windows with |ConPTY|:
960+
stdin, stdout, and stderr are always connected through pipes
961+
to the pseudo console, regardless of callback settings.
962+
Since stdout and stderr share the same pipe, they cannot be
963+
separated by "err_cb".
964+
This is because the CreatePseudoConsole() API only accepts one
965+
input and one output handle, with no separate handle for
966+
stderr.
950967

951968
There are extra options:
952969
"term_name" name to use for the buffer name, instead

0 commit comments

Comments
 (0)