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

Feature Request: configurable screen buffer size #3612

Closed
ffays opened this issue Nov 18, 2019 · 4 comments
Closed

Feature Request: configurable screen buffer size #3612

ffays opened this issue Nov 18, 2019 · 4 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered

Comments

@ffays
Copy link

ffays commented Nov 18, 2019

Description of the new feature

Provide a way to configure the screen buffer size

either

  1. provide a way to configure the number of rows, and possibly columns, for the screen buffer size.
  2. or provide a way to configure the maximum size of the screen buffer as number of bytes.

Note: option 1 will be backward compatible with the original cmd and prowershell consoles, and option 2 provides a better understanding of memory footprint.

Proposed technical implementation details

These settings may be defined in the configuration file Windows Terminal JSON Settings.

e,g,

(option 1)

screenBufferWidth: 160
screenBufferHeight: 100000

Where screenBufferWidth is a number of columns and screenBufferHeight a number of lines.

(option 2)

screenBufferSize 10485760

Where screenBufferSize is a number of bytes (hereby 10MB)

@ffays ffays added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Nov 18, 2019
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Nov 18, 2019
@zadjii-msft
Copy link
Member

You can actually already use historySize to change the size of the scrollback, which combined with the initialRows and initialCols forms the entire size of the "screen buffer" in the terminal.

@zadjii-msft zadjii-msft added Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered labels Nov 18, 2019
@DHowett-MSFT
Copy link
Contributor

Looks like this has been answered. Let us know!

@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Nov 18, 2019
@ffays
Copy link
Author

ffays commented Nov 20, 2019

Thank you for your answer.

I changed the settings initialRows, initialCols and historySize, and it works as expected.

With as limitation, historySize cannot go beyond 32767 lines ... why such limitation that ages from the 16-bit computer era?

Last words: to my point of view, I believe that "historySize" term is misleading as it can be confounded with command history size...

@zadjii-msft
Copy link
Member

So, the historySize is restricted to that because at the time of writing, both the Terminal and the vintage console share the same TextBuffer implementation. Since the vintage console needs to be restricted to SHRT_MAX lines to be able to respond to the Console API correctly, the Terminal is also locked to that size.

This is a limitation we plan on relaxing in the future - we're hoping in a future release to even add support for an "infinite scrollback" (#1410) mode (though it's unlikely to land in 1.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

3 participants