add option to enable Scroll Forward like on cmd #11840

Open
opened 2026-01-31 02:59:05 +00:00 by claunia · 7 comments
Owner

Originally created by @rafalou38 on GitHub (Dec 19, 2020).

Description of the new feature/enhancement

it would be nice to have an option that would allow scrolling under the end of the text so everything is not stacked at the bottom and I don't have to do clear every time

there is no need to be able to scroll indefinitely, just a bit so we can see a bit better

expected:

image

actual:

image

Proposed technical implementation details

an option in the settings.json like

"ScrollForward": true,

Originally created by @rafalou38 on GitHub (Dec 19, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement it would be nice to have an option that would allow scrolling under the end of the text so everything is not stacked at the bottom and I don't have to do `clear` every time there is no need to be able to scroll indefinitely, just a bit so we can see a bit better ## expected: ![image](https://user-images.githubusercontent.com/58974586/102687783-f64b8400-41f1-11eb-9b9a-f5940dbc11a6.png) ## actual: ![image](https://user-images.githubusercontent.com/58974586/102687807-1bd88d80-41f2-11eb-895f-fb64cbb4c2d3.png) # Proposed technical implementation details an option in the settings.json like `"ScrollForward": true,`
Author
Owner

@zadjii-msft commented on GitHub (Dec 21, 2020):

You know what, in the past I absolutely hated this idea. It is one of those things that made it harder for the console to achieve parity with linux terminals.

Now I'm thinking that it might be okay in a limited fashion. There'd still only be one mutable viewport, but in scrollForward mode, we'd let you scroll the viewport down (height-1) lines from the bottom line. I think everything in the Terminal's VT implementation already uses the mutable viewport's corrdinates, rather than the visible viewport, so this might be okay.

The tricky case would be scrolling forward at the bottom of the buffer - there'd be no extra lines there, so we'd have to add them as the user tried to scroll forward. That'd be weird.

@zadjii-msft commented on GitHub (Dec 21, 2020): You know what, in the past I absolutely hated this idea. It is one of those things that made it harder for the console to achieve parity with linux terminals. Now I'm thinking that it might be okay in a limited fashion. There'd still only be one mutable viewport, but in scrollForward mode, we'd let you scroll the viewport down (height-1) lines from the bottom line. I think everything in the Terminal's VT implementation already uses the mutable viewport's corrdinates, rather than the visible viewport, so this might be okay. The tricky case would be scrolling forward at the bottom of the buffer - there'd be no extra lines there, so we'd have to add them as the user tried to scroll forward. That'd be weird.
Author
Owner

@jiasli commented on GitHub (Oct 13, 2021):

Copied from https://github.com/microsoft/terminal/issues/2643#issuecomment-940828685

Something like scrollBeyondLastLine from VS Code will be certainly wonderful:

image

https://code.visualstudio.com/docs/getstarted/settings

  // Controls whether the editor will scroll beyond the last line.
  "editor.scrollBeyondLastLine": true,
@jiasli commented on GitHub (Oct 13, 2021): <sub>Copied from https://github.com/microsoft/terminal/issues/2643#issuecomment-940828685</sub> Something like `scrollBeyondLastLine` from VS Code will be certainly wonderful: ![image](https://user-images.githubusercontent.com/4003950/136928845-213e62b2-aa08-469f-9d0a-972a266860be.png) https://code.visualstudio.com/docs/getstarted/settings ```jsonc // Controls whether the editor will scroll beyond the last line. "editor.scrollBeyondLastLine": true, ```
Author
Owner

@noheromen commented on GitHub (Jan 24, 2022):

Any dvelepoment done in this area? It would be really great if it was implemented. Same way as is in actuall powershell. Thanks

@noheromen commented on GitHub (Jan 24, 2022): Any dvelepoment done in this area? It would be really great if it was implemented. Same way as is in actuall powershell. Thanks
Author
Owner

@zadjii-msft commented on GitHub (Jan 24, 2022):

Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button?
image
That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

@zadjii-msft commented on GitHub (Jan 24, 2022): Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button? ![image](https://user-images.githubusercontent.com/18356694/91237459-5cbb0c80-e700-11ea-9347-b9b1ec2813b1.png) That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️
Author
Owner

@noheromen commented on GitHub (Jan 23, 2024):

Any progression on this task? it would be really helpful to have this option. Thanks

@noheromen commented on GitHub (Jan 23, 2024): Any progression on this task? it would be really helpful to have this option. Thanks
Author
Owner

@zadjii-msft commented on GitHub (Jan 23, 2024):

Nope. If you/someone would like to help contribute a fix here, I'd be happy to start pointing you in the right direction. But I (honestly) don't think we'll be able to get to this for a very long time.

Note

Walkthrough

(in progress)

  • _scrollOffset in Terminal.cpp/hpp is what controls the distance up from the mutable viewport the user has scrolled. So scroll one line up, and the value is 1. This should be changed to also allow negative values.
  • We shouldn't allow scroll-forward in the alt buffer (for things like vim)
  • Tricky edge case: how do we deal with scroll-forward when the buffer is full? There's literally not lines in the buffer to render at that point. We'd probably have to somehow fake it in the RenderData, or just prevent scroll-forward in that case entirely
  • Once that all works, create a profile setting in MTSMSettings and plumb that through to the TermControl
@zadjii-msft commented on GitHub (Jan 23, 2024): Nope. If you/someone would like to help contribute a fix here, I'd be happy to start pointing you in the right direction. But I (honestly) don't think we'll be able to get to this for a very long time. > [!Note] > ## Walkthrough (_in progress_) * `_scrollOffset` in `Terminal.cpp`/`hpp` is what controls the distance up from the mutable viewport the user has scrolled. So scroll one line up, and the value is 1. This should be changed to also allow negative values. * We shouldn't allow scroll-forward in the alt buffer (for things like `vim`) * Tricky edge case: how do we deal with scroll-forward when the buffer is full? There's literally not lines in the buffer to render at that point. We'd probably have to somehow fake it in the `RenderData`, or just prevent scroll-forward in that case entirely * Once that all works, create a profile setting in `MTSMSettings` and plumb that through to the `TermControl`
Author
Owner

@lukexyz commented on GitHub (Jan 24, 2024):

Any progression on this task? it would be really helpful to have this option. Thanks

I think this is a perfectly reasonable nudge. Having said that thank you for your candid response @zadjii-msft

@lukexyz commented on GitHub (Jan 24, 2024): > Any progression on this task? it would be really helpful to have this option. Thanks I think this is a perfectly reasonable nudge. Having said that thank you for your candid response @zadjii-msft
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11840