-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize VtPipeTerm #17647
Modernize VtPipeTerm #17647
Conversation
This comment has been minimized.
This comment has been minimized.
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="main.cpp" /> | ||
<ClCompile Include="VtConsole.cpp" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if i recall, this builds in Windows too. Can you update sources
?
unsigned short width = srViewport.Right - srViewport.Left + 1; | ||
unsigned short height = srViewport.Bottom - srViewport.Top + 1; | ||
HPCON hPC = nullptr; | ||
THROW_IF_FAILED(ConptyCreatePseudoConsole(viewportSize, pipe.client.get(), pipe.client.get(), 0, &hPC)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, it's a duplex pipe. Clever.
@@ -1,16 +0,0 @@ | |||
// Copyright (c) Microsoft Corporation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could keep this, it is OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I forgot about this comment.
I initially thought this was a leftover file for translatable strings, but now I realize that this is for the .exe information. Hmmm, I think it's fine to remove in that case, since despite this tool being part of the OS repo, I'm not sure it's used by anyone there anyway.
This shortens VtPipeTerm quite a bit, which used to have various debug
flags and modes. I kept the
--out
flag to redirect the output to afile, but I removed the
--debug
(pipe the output through WSL andshow escape sequences visually) and
--headless
(hide conpty) flags.I did this, because VtPipeTerm always used the system ConPTY API
but I needed it to use my local OpenConsole. I also wanted it to
use overlapped IO for testing but found that it was too difficult
to refactor make that work.
I also noticed that the project was the only holdout for
conpty.h
which had to be kept in sync withwinconpty.h
.