[vim/vim] docs: clarify term_start() I/O behavior for Unix pty and MS-Windows ConPTY (PR #19892)

8 views
Skip to first unread message

h_east

unread,
Apr 2, 2026, 8:43:26 AM (17 hours ago) Apr 2
to vim/vim, Subscribed

Explain how stdin/stdout/stderr are connected in term_start():

  • On Unix, they default to pty; only "err_cb" switches stderr to a pipe, which may cause output order differences due to buffering.
  • On MS-Windows with ConPTY, they are always pipes and stdout/stderr share the same pipe, so "err_cb" cannot separate them.

Related: #16354


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19892

Commit Summary

  • bedd8a7 docs: clarify term_start() I/O behavior for Unix pty and MS-Windows ConPTY

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19892@github.com>

h_east

unread,
Apr 2, 2026, 8:49:45 AM (17 hours ago) Apr 2
to vim/vim, Subscribed
h-east left a comment (vim/vim#19892)

@mattn Mind giving this a quick review?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19892/c4177635658@github.com>

mattn

unread,
Apr 2, 2026, 11:04:11 AM (15 hours ago) Apr 2
to vim/vim, Subscribed

@mattn commented on this pull request.

LGTM.

If you think it's worth mentioning the technical reason, the CreatePseudoConsole() API itself only takes one input and one output handle (no separate stderr), which is why they can't be separated:
https://learn.microsoft.com/en-us/windows/console/createpseudoconsole


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19892/review/4051303185@github.com>

mattn

unread,
Apr 2, 2026, 11:23:35 AM (15 hours ago) Apr 2
to vim/vim, Subscribed
mattn left a comment (vim/vim#19892)

As you may know, job_start() does not use CreatePseudoConsole(), so err_cb correctly separates stderr there.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19892/c4178655466@github.com>

h_east

unread,
Apr 2, 2026, 11:37:05 AM (14 hours ago) Apr 2
to vim/vim, Push

@h-east pushed 1 commit.

  • eb3dd9e Added information received from review comments


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19892/before/bedd8a727bd91850e9dfd91b0592ed62859280c5/after/eb3dd9e19fb59cd731515bab69bbb73a75f6e210@github.com>

h_east

unread,
Apr 2, 2026, 11:41:26 AM (14 hours ago) Apr 2
to vim/vim, Subscribed
h-east left a comment (vim/vim#19892)

@mattn Thanks for the reviewing. I added information based on your comments.

As you may know, job_start() does not use CreatePseudoConsole(), so err_cb correctly separates stderr there.

Yeah, The text added in this pull request is within :h term_start(), so it's fine.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19892/c4178759964@github.com>

Christian Brabandt

unread,
Apr 2, 2026, 12:36:25 PM (13 hours ago) Apr 2
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19892)

thanks


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19892/c4179063695@github.com>

Christian Brabandt

unread,
Apr 2, 2026, 12:45:38 PM (13 hours ago) Apr 2
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19892)

included as of 0646047


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19892/c4179116897@github.com>

Christian Brabandt

unread,
Apr 2, 2026, 12:45:40 PM (13 hours ago) Apr 2
to vim/vim, Subscribed

Closed #19892.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19892/issue_event/24154668921@github.com>

Reply all
Reply to author
Forward
0 new messages