[PR #10772] [MERGED] [DefApp] Teach connection and tab to negotiate initial size #28226

Open
opened 2026-01-31 09:27:09 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10772
Author: @miniksa
Created: 7/23/2021
Status: Merged
Merged: 7/26/2021
Merged by: @undefined

Base: mainHead: dev/miniksa/def_initial_size


📝 Commits (1)

  • a9298fc Teach connection and tab to negotiate initial size on receiving an inbound PTY.

📊 Changes

2 files changed (+22 additions, -2 deletions)

View changed files

📝 src/cascadia/TerminalApp/TabManagement.cpp (+8 -0)
📝 src/cascadia/TerminalConnection/ConptyConnection.cpp (+14 -2)

📄 Description

  • For tabs started from the Terminal, the initial sizing information is
    passed into the connection and used to establish the PTY. Those
    parameters are given over to the OpenConsole.exe acting as PTY to
    establish the initial buffer/window size.
  • However, for tabs started from outside, the PTY is created with some
    default buffer information FIRST as the Terminal hasn't even been
    involved yet. As such, when the Terminal gets that connection, it must
    tell the PTY to resize just as it connects to match the window size
    it's about to use.
  • Ongoing resize operations in the Terminal did and still work fine
    because they transmitted the updated size with the
    ResizePseudoConsole API.

Validation Steps Performed

  • Confirmed existing tabs opening have correct initial size in PTY
    (like with CMD mode con command)
  • Confirmed inbound cmd tabs have correct initial size in PTY via
    mode con command per bug repro

Closes #9811


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10772 **Author:** [@miniksa](https://github.com/miniksa) **Created:** 7/23/2021 **Status:** ✅ Merged **Merged:** 7/26/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/miniksa/def_initial_size` --- ### 📝 Commits (1) - [`a9298fc`](https://github.com/microsoft/terminal/commit/a9298fc7e79772f5e7c8b33e99728143e52adbb8) Teach connection and tab to negotiate initial size on receiving an inbound PTY. ### 📊 Changes **2 files changed** (+22 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/TabManagement.cpp` (+8 -0) 📝 `src/cascadia/TerminalConnection/ConptyConnection.cpp` (+14 -2) </details> ### 📄 Description - For tabs started from the Terminal, the initial sizing information is passed into the connection and used to establish the PTY. Those parameters are given over to the `OpenConsole.exe` acting as PTY to establish the initial buffer/window size. - However, for tabs started from outside, the PTY is created with some default buffer information FIRST as the Terminal hasn't even been involved yet. As such, when the Terminal gets that connection, it must tell the PTY to resize just as it connects to match the window size it's about to use. - Ongoing resize operations in the Terminal did and still work fine because they transmitted the updated size with the `ResizePseudoConsole` API. ## Validation Steps Performed - [x] Confirmed existing tabs opening have correct initial size in PTY (like with CMD `mode con` command) - [x] Confirmed inbound cmd tabs have correct initial size in PTY via `mode con` command per bug repro Closes #9811 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:27:09 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28226