-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Document the resize quirk for ConPTY #16911
Comments
in lieu of a longer, more thorough response:
That's in the OpenConsole version of conpty. I forget if we shipped that to the OS conpty. We never really documented it cause it felt like a hack at the time, but we've been using for a few years now. Also I think we assumed that a caller who passed that would need to reflow their own buffer in the exact same way, to keep things in sync. But that might be helpful to experiment with? |
I saw this flag mentioned in another issue (I can't recall which one). I gave it a try but it had no effect, it doesn't appear to be in my OS version. I'll research obtaining the openconsole version. If I can get the resize quirk working I will just have to do my own reflow. My library shows a terminal quite a while after ConPTY has begun producing output, so I have to reflow my own buffer contents. Perhaps I could mimic the reflow capability from this repo's |
For anyone who may be curious, I managed to obtain the ConPTY.dll and OpenConsole.exe prebuilt from this link (https://dev.azure.com/ms/terminal/_build?definitionId=136&branchFilter=26987%2C26987%2C26987%2C26987) by finding the latest build for the main branch, then found the Build x64 stage's build-x64-Release.zip artifact and downloaded it. |
After downloading the latest ConPTY.dll, PSEUDOCONSOLE_RESIZE_QUIRK did work. Thank you for pointing this out @zadjii-msft . I've since adjusted this issue to remove the request for disabling reflow output. I did add another request for a possible plain-text render feature as it seemed like it could be related to my request for programmatic reflow. If I need to break that out into another issue I can do that. |
Okay, thanks for trying that out! I'd also caution - it's called the "quirk" because it's expecting the hosting terminal application to be able to reflow their own buffer in the same way conpty does. No one else has really tried that out, so do send feedback if you collect any. For now, I'm gonna convert this issue into "document and ship this". Thanks! (also linked up to #15065 which is what we're using for actually shipping conpty) |
Since this is now serving as the issue for documenting the resize quirk, I've moved the request for programmatic reflow and plain-text rendering to this issue: |
Description of the new feature/enhancement
When I issue a ResizePseudoConsole call, if the buffer is changing from a smaller size to a larger one, ConPTY outputs the reflowed buffer and overwrites any content currently in the terminal. If there were 50 lines of output, the buffer size was 24 lines, and I resize to 30 lines, the output will be overwritten with 24 lines. (The amount of content in the buffer at the time of the resize).
Proposed technical implementation details
Possible Solutions:
Example Pseudocode:
Related
The text was updated successfully, but these errors were encountered: