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

Screen Buffer Size and overscrolling #122

Closed
jwatt opened this issue Feb 26, 2018 · 13 comments
Closed

Screen Buffer Size and overscrolling #122

jwatt opened this issue Feb 26, 2018 · 13 comments
Assignees
Labels
Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Conhost For issues in the Console codebase Resolution-Fix-Available It's available in an Insiders build or a release
Milestone

Comments

@jwatt
Copy link

jwatt commented Feb 26, 2018

One irritation with terminal apps on Windows is the concept of the Screen Buffer Size. Having this be a fixed value rather than dynamically growing, and particularly the fact that the scrollable length of the window is fixed to this value, makes these Windows apps feel really archaic and clunky having had experience of macOS/Linux/etc.

Personally the apps that I build produce a lot of build output, and I want to be able to scroll back/search through it on the occassions that I need to (without having to be slowed down by the need to up a separate log file). To do that I have to set the Screen Buffer Size to something large (9999). But then most times there's an ocean of blank are below the prompt! Swipe scrolling past the end of the visual output (and prompt) and having to scroll back gets tiresome real quick...

@tobia
Copy link

tobia commented Mar 19, 2018

Yes, coming from Ubuntu this is really annoying.

Most (all?) console apps are in either of two possible modes at any given time:

  1. they are appending output uni-directionally to the bottom (by writing to stdout / stderr)
  2. or they are drawing on the visible region of the console (by using curses / ncurses)

There is no instance that I'm aware of where an app writes to random places off-screen.

I think the console subsystem should keep track of the lowest (most bottom) line that has been written to since the last clear or reset call and use it as a virtual limit to the scrollable area. Otherwise it becomes really hard to scroll to the last written line, which is also the most interesting line and where all the action happens in a terminal emulator.

No other terminal emulator in the world allows scrolling below the lowest line that has been written to! It makes no sense.

@zadjii-msft
Copy link
Member

I agree this is annoying. Unfortunately, this gets filed under one of those things that's just "inherent differences between windows and linux". Windows Consoles have always had a "buffer" that they fill, while terminals have a viewport and a scrollback that catches things that fall off.

I've been thinking about trying to implement such functionality, where we pretend that the buffer is only as big as the filled portion, (but if an app writes outside that, we'll grow to match what they've output). I don't know if that'd introduce a bunch of bugginess - I'd probably have to add a setting, which means adding a checkbox, which means making the propsheet bigger, which is asking for trouble...

Maybe in the future? I'll add it to the backlog.

@zadjii-msft zadjii-msft self-assigned this Mar 19, 2018
@zadjii-msft zadjii-msft added Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. backlog labels Mar 19, 2018
@zadjii-msft zadjii-msft added this to the Backlog milestone Mar 19, 2018
@zadjii-msft zadjii-msft added the Product-Conhost For issues in the Console codebase label Mar 19, 2018
@mikemaccana
Copy link
Contributor

Thanks @zadjii-msft it would be so cool if you did this! People have been talking about the overscroll for ages - https://superuser.com/questions/1273370/stop-windows-command-prompt-from-scrolling-past-cursor Maximus5/ConEmu#172 and even a new Microsoft employee (who I can't remember) wrote about it in their 'switching to Windows' guide.

@gobbedy
Copy link

gobbedy commented Jun 12, 2018

I second this, my scripts spit out massive amounts of data to the console and the overscrolling makes it a nuisance to sift through. Compared to other feature requests in the backlog this ones seems like a pretty easy one too.

@mshindal
Copy link

It seems like the Windows Console knows where the prompt is, because if you produce a lot of output, scroll up, and then type something, it will jump down to where the prompt is. So if we could stop the scrolling where the prompt is, we would get the behavior we want.

@zadjii-msft
Copy link
Member

You know, I actually made some changes in this area for the upcoming 1807 release (2Fall2CreatorsUpdate). It won't prevent you from overscrolling, but it will jump back to the spot it was before you scrolled in cmd, powershell and wsl.

It's possible in the following release (circa spring 2019) there might be more news in this area ;)

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added the Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) label May 29, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 29, 2019
@DHowett-MSFT
Copy link
Contributor

I just realized that this is a feature we shipped in 19H1 (1903):

image

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Oct 8, 2019
@DHowett-MSFT DHowett-MSFT added the Resolution-Fix-Available It's available in an Insiders build or a release label Oct 8, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 8, 2019
@mikemaccana
Copy link
Contributor

Brilliant. Is the default updated to avoid the overscroll? Most users probably don't want to scroll and see a bunch of blackness.

@zadjii-msft
Copy link
Member

@mikemaccana Nope. All those features on the "Terminal" property page are all experimental, and they might result in unexpected (read: changed API behavior) relative to the legacy console, so they're all off by default. Users will need to opt-in to the newer functionality.

@zadjii-msft zadjii-msft modified the milestones: Console Backlog, 19H1 Oct 24, 2019
@mikemaccana
Copy link
Contributor

All those features on the "Terminal" property page are all experimental

OK. What does experimental mean?

they might result in unexpected (read: changed API behavior) relative to the legacy console

Yep there's definitely a difference in behavior. But since users launching Terminal are starting a different app from those running the old console, do you think it would then be reasonable for the default behavior to be different, if the new default would be better more users?

@mikemaccana
Copy link
Contributor

Oh wait are we talking about Windows Terminal or the old apps? The repo name confuses me! If we're talking about the old apps then sure don't change anything.

@zadjii-msft
Copy link
Member

I'm talking about the "vintage" console, conhost.exe. It's a little confusing since both codebases are in the same repo, but usually you can differentiate which one a thread is talking about by examining the "Product" labels:
image

@mikemaccana
Copy link
Contributor

Ah thanks Mike and sorry for the confusion!

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.) Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Conhost For issues in the Console codebase Resolution-Fix-Available It's available in an Insiders build or a release
Projects
None yet
Development

No branches or pull requests

8 participants