[vim/vim] Fix incorrect stdout redirection to Visual Studio Output window in ConPTY terminal (PR #19589)

2 views
Skip to first unread message

gcrtnst

unread,
9:50 AM (13 hours ago) 9:50 AM
to vim/vim, Subscribed

When launching GVim from within Visual Studio and opening a ConPTY-based terminal, the standard output of the terminal is incorrectly redirected to the Visual Studio Output window instead of the terminal itself.

untitled.png (view on web)

This PR addresses the issue by specifying STARTF_USESTDHANDLES in StartupInfo and explicitly setting the standard input/output/error handles to INVALID_HANDLE_VALUE.

While I couldn't find any official Microsoft documentation explicitly covering this behavior, I've verified that several major terminal emulators (Windows Terminal, Alacritty, and WezTerm) use this same approach to handle similar cases.


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

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

Commit Summary

  • eba8917 Explicitly invalidate std handles for ConPTY initialization

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/19589@github.com>

Reply all
Reply to author
Forward
0 new messages