Skip to content
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

Bug Report: initialRows (or buffersize) doesn't get updated on windows size changes #2630

Closed
Vreyesm opened this issue Sep 1, 2019 · 9 comments
Assignees
Labels
Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Milestone

Comments

@Vreyesm
Copy link

Vreyesm commented Sep 1, 2019

Environment

Windows build number: Microsoft Windows [Versión 10.0.18362.295]
Windows Terminal version: 0.4.2382.0

Steps to reproduce

  1. Set the initialRows value to something like 30 rows (a value that makes the openned window has less rows than the maximized window should have).
  2. Maximize the window.
  3. Run some command with a lot of output (like ps, lsor dir).

Expected behavior

  • The buffersize setted with initialRows gets updated after window size changes.
  • Behavior on PowerShell.
    image

image

Actual behavior

  • After maximizing the window and running ps the buffer size setted with the initialRows value doesn't get updated after the window size changes.

image

image

  • The problem gets solved if I open a new tab and run the command again.
    image
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Sep 1, 2019
@zadjii-msft zadjii-msft added Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. labels Sep 3, 2019
@zadjii-msft zadjii-msft added this to the Terminal v1.0 milestone Sep 3, 2019
@DHowett-MSFT DHowett-MSFT changed the title Bug Report: initialRows (or buffersize) doesn't get udpated on windows size changes Bug Report: initialRows (or buffersize) doesn't get dupated on windows size changes Sep 5, 2019
@DHowett-MSFT DHowett-MSFT changed the title Bug Report: initialRows (or buffersize) doesn't get dupated on windows size changes Bug Report: initialRows (or buffersize) doesn't get uppated on windows size changes Sep 5, 2019
@DHowett-MSFT DHowett-MSFT changed the title Bug Report: initialRows (or buffersize) doesn't get uppated on windows size changes Bug Report: initialRows (or buffersize) doesn't get updated on windows size changes Sep 5, 2019
@DHowett-MSFT DHowett-MSFT added Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Sep 5, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Sep 5, 2019
@zadjii-msft
Copy link
Member

@Vreyesm Out of curiosity, does this repro if you execute Remove-Module psreadline before maximizing? Does it repro if you switch the default profile to cmd?

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Sep 5, 2019
@Vreyesm
Copy link
Author

Vreyesm commented Sep 6, 2019

@zadjii-msft Executing Remove-Module PSReadline doesn't make any changes on the behavior, but if I change the default profile to cmd (or wsl running ubuntu 18.04) as you suggest, the problem gets solved (following the steps described above).

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Sep 6, 2019
@zadjii-msft zadjii-msft added the Priority-2 A description (P2) label Jan 22, 2020
@hwinkler
Copy link

I too have this problem as described, yet my default profile is wsl Ububtu 18.04.

I can confirm the workaround described, opening a new tab: the new tab doesn't have the problem. Thanks for that tip.

@zadjii-msft zadjii-msft self-assigned this Mar 16, 2020
@zadjii-msft
Copy link
Member

Hey so while burning down bugs, it looks like this is the same bug as #2815. This one was filed first, but the other one's got a bit more details on the specific root cause of the problem, so I'm going to mark that one as the parent bug. Regardless, I've got a fix ready for these that should be in PR later today. Thanks!

/dup #2815

@ghost
Copy link

ghost commented Mar 17, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Mar 17, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Mar 17, 2020
@f9analytics
Copy link

Any idea when this buffer resize issue will have a fix? If I run a normal cmd the screen adjusts, if I run in Windows Terminal I get [process exited with code 4294967295] {See Image-1 }. If I manually expand the window, and rerun, everything works fine {See Image-2 }.

Image-1
Error

Image-2
Ok

@zadjii-msft
Copy link
Member

Oh, that's probably #4062 or #5094, or some combo of the two

@f9analytics
Copy link

@zadjii-msft - I believe it is thrown due to SetCursorPosition. Please See Below:

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was 30.
at System.Console.SetCursorPosition(Int32 left, Int32 top)

Any thoughts? thx

@f9analytics
Copy link

@zadjii-msft - I think I found the issue. The old school conhost.exe apparently auto resizes buffer rows without any explicit setting. If I set the console buffer height explicitly. No error. It works as intended. perfectly. Please let anyone know that had similar issue.

Thanks again msft.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

6 participants