Skip to content
This repository has been archived by the owner on Oct 8, 2022. It is now read-only.

Resizing error with Windows Terminal #40

Open
vladdeSV opened this issue May 29, 2020 · 3 comments
Open

Resizing error with Windows Terminal #40

vladdeSV opened this issue May 29, 2020 · 3 comments
Labels
cannot fix Issue caused by something other than scone windows Specific to the Windows platform

Comments

@vladdeSV
Copy link
Owner

vladdeSV commented May 29, 2020

Resizing using Windows Terminal v1.0.1401.0 with any shell causes very odd behavior. The Terminal does not resize, and the buffer becomes bugged.


using this issue for keeping in sync with microsoft/terminal#5843 microsoft/terminal#5094. although it might be possible this is not directly related as I experience slightly different effects than described in the issue.

@vladdeSV vladdeSV added windows Specific to the Windows platform cannot fix Issue caused by something other than scone labels May 29, 2020
@vladdeSV
Copy link
Owner Author

vladdeSV commented May 29, 2020

The code works for Powershell 7-preview (powershell.exe) and Command Prompt (cmd.exe).

Correction: GetCurrentConsoleFont(...) returns an "invalid" font in Windows Terminal. The font has an id of 0 and a size of 0x16px which causes this line to exit early.

If that line is commented out the resizing happens, which is when the buffer bugs out.

@vladdeSV
Copy link
Owner Author

vladdeSV commented Jun 8, 2020

Update: Seems this issue is related to microsoft/terminal#5094

@vladdeSV
Copy link
Owner Author

vladdeSV commented Jun 9, 2020

According to microsoft/terminal#6395 (comment) getting the font size is not possible with the Windows Terminal by design. This means I cannot detect the size of the terminal. Because CMD/Powershell (unsure if I am using the terminology right?) cannot set the window size to something smaller than the minimum size I cannot ensure the resizing will go through.

However, it may become possible to resize the window later on using ANSI escape codes. If I can detect it the terminal is a Windows Terminal, I could provide a Windows Terminal specific interface Output which uses ANSI-codes instead.

But this is not possible yet. Not sure what to do.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cannot fix Issue caused by something other than scone windows Specific to the Windows platform
Projects
None yet
Development

No branches or pull requests

1 participant