Scroll past last line #3719

Closed
opened 2026-01-30 23:28:20 +00:00 by claunia · 13 comments
Owner

Originally created by @scrouthtv on GitHub (Sep 2, 2019).

On many Linux Terminal Emulators it is possible to scroll past the last line to move it to the center of the screen (or even further).

Would it be possible to implement a comparable feature?

Originally created by @scrouthtv on GitHub (Sep 2, 2019). On many Linux Terminal Emulators it is possible to scroll past the last line to move it to the center of the screen (or even further). Would it be possible to implement a comparable feature?
Author
Owner

@egmontkob commented on GitHub (Sep 2, 2019):

On many Linux Terminal Emulators

Which ones? I can't recall seeing this functionality in any of them.

@egmontkob commented on GitHub (Sep 2, 2019): > On many Linux Terminal Emulators Which ones? I can't recall seeing this functionality in any of them.
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 3, 2019):

Hi! Thanks for the request. We actually worked really hard on the in-box windows console to add the option to turn this behavior off. We're probably not going to reintroduce it.

@DHowett-MSFT commented on GitHub (Sep 3, 2019): Hi! Thanks for the request. We actually worked really hard on the _in-box windows console_ to add the option to turn this behavior **off**. We're probably not going to reintroduce it.
Author
Owner

@scrouthtv commented on GitHub (Sep 6, 2019):

@egmontkob
shells
these are the first four i could think off

on linux i run termite as an emulator & it looks similar

@scrouthtv commented on GitHub (Sep 6, 2019): @egmontkob ![shells](https://user-images.githubusercontent.com/23227405/64449267-cb621d00-d0df-11e9-97b5-5b254a2e8891.jpg) these are the first four i could think off on linux i run termite as an emulator & it looks similar
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 6, 2019):

Those are all the same terminal emulator, windows conhost. Of course they have the same behavior.

@DHowett-MSFT commented on GitHub (Sep 6, 2019): Those are all the same terminal emulator, _windows conhost_. Of course they have the same behavior.
Author
Owner

@scrouthtv commented on GitHub (Sep 6, 2019):

Will there be an option in the settings to use the conhost type behaviour in the new Terminal?

Thanks for your help nevertheless.

@scrouthtv commented on GitHub (Sep 6, 2019): Will there be an option in the settings to use the conhost type behaviour in the new Terminal? Thanks for your help nevertheless.
Author
Owner

@egmontkob commented on GitHub (Sep 6, 2019):

The screenshots are not Linux terminals, as Dustin already pointed out.

Termite uses VTE for terminal emulation, which I'm a developer of, so I can pretty confidently tell you that it doesn't allow this kind of scrolling. :)

I'm honestly wondering: What's your actual use case, why do you want this behavior?

The most precious use of the screen real estate area is to show the previous command's output. If it's easier for your eyes to look at the top of the screen, you can clear the screen by pressing Ctrl+L. Unlike in some other terminals (e.g. xterm; not sure about Windows Terminal), in VTE it scrolls out the previous contents so you don't lose information.

Another trick I've seen is to emit from your prompt a couple of newlines (maybe half the height of the screen), followed by the same number of cursor up movements. This ensures there's room below the prompt, and that the contents are scrollable accordingly. It doesn't position the scrollbar where you'd probably want it, though, but you might give it a try.

@egmontkob commented on GitHub (Sep 6, 2019): The screenshots are not Linux terminals, as Dustin already pointed out. Termite uses VTE for terminal emulation, which I'm a developer of, so I can pretty confidently tell you that it doesn't allow this kind of scrolling. :) I'm honestly wondering: What's your actual use case, why do you want this behavior? The most precious use of the screen real estate area is to show the previous command's output. If it's easier for your eyes to look at the top of the screen, you can clear the screen by pressing Ctrl+L. Unlike in some other terminals (e.g. xterm; not sure about Windows Terminal), in VTE it scrolls out the previous contents so you don't lose information. Another trick I've seen is to emit from your prompt a couple of newlines (maybe half the height of the screen), followed by the same number of cursor up movements. This ensures there's room below the prompt, and that the contents are scrollable accordingly. It doesn't position the scrollbar where you'd probably want it, though, but you might give it a try.
Author
Owner

@scrouthtv commented on GitHub (Sep 7, 2019):

Sorry if I got something wrong...

Just my very first problem was using autocompletion:
example

I don't know the exact issue here, but using this specific feature just feels a lot better with having free space below:
example2

@scrouthtv commented on GitHub (Sep 7, 2019): Sorry if I got something wrong... Just my very first problem was using autocompletion: ![example](https://user-images.githubusercontent.com/23227405/64474042-b7193100-d16e-11e9-903c-dd64915a3c6c.gif) I don't know the exact issue here, but using this specific feature just feels a lot better with having free space below: ![example2](https://user-images.githubusercontent.com/23227405/64474070-49b9d000-d16f-11e9-8417-778a3e7a707c.gif)
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 7, 2019):

That just looks like a bug, honestly. Either we are handling something wrong or fish isn’t doing something right. Would you share your exact repro steps? Thanks!

@DHowett-MSFT commented on GitHub (Sep 7, 2019): That just looks like a bug, honestly. Either we are handling something wrong or fish isn’t doing something right. Would you share your exact repro steps? Thanks!
Author
Owner

@egmontkob commented on GitHub (Sep 7, 2019):

The upper screencast definitely looks buggy. It's unclear to me what environment that shows, there's no window decoration to give a hint, and the color scheme doesn't match the earlier screenshots either. @scrouthtv could you please tell us what terminal emulator (e.g. Windows Terminal/Conhost or Termite) and what shell (fish? with the same config as in the bottom one?) that is? (Or Dustin, is it clear to you and it's only me missing something?)

Anyway. I could easily imagine the user experience that the prompt shows up in the bottom row initially, and is pushed upwards on demand where are completion choices to display. Or I could easily imagine the prompt being pushed upwards straight away to leave room for a fixed number of such completions later. Either one seems nicely usable. In either case, though, it's your shell that knows how much room it wants to reserve for this feature and when it wants to do (vs. when it actually intends to fill up that area with text, without further empty lines below), and as such, it should be the shell that emits control instructions accordingly. I can't see how the terminal on its own could automagically add those lines to the scrollable area.

@egmontkob commented on GitHub (Sep 7, 2019): The upper screencast definitely looks buggy. It's unclear to me what environment that shows, there's no window decoration to give a hint, and the color scheme doesn't match the earlier screenshots either. @scrouthtv could you please tell us what terminal emulator (e.g. Windows Terminal/Conhost or Termite) and what shell (fish? with the same config as in the bottom one?) that is? (Or Dustin, is it clear to you and it's only me missing something?) Anyway. I could easily imagine the user experience that the prompt shows up in the bottom row initially, and is pushed upwards on demand where are completion choices to display. Or I could easily imagine the prompt being pushed upwards straight away to leave room for a fixed number of such completions later. Either one seems nicely usable. In either case, though, it's your shell that knows how much room it wants to reserve for this feature and when it wants to do (vs. when it actually intends to fill up that area with text, without further empty lines below), and as such, it should be the shell that emits control instructions accordingly. I can't see how the terminal on its own could automagically add those lines to the scrollable area.
Author
Owner

@scrouthtv commented on GitHub (Sep 7, 2019):

First thing's first, I checked back on some Linux Terminal emulators and none of them really had this feature. So I guess I was wrong the entire time.

I didn't do much for this to happen. I installed fish via cygwin, changed the cmd.exe in the json config to the path of fish.exe (cygwin provides linux applications as exes) and just tried autocompletion on everything default settings.

I'm pretty positive this is just some cygwin compatibility bug because it looks the same with auto completion in zsh...

@egmontkob Pushing up the prompt is how I guess it is supposed to work:
Peek 2019-09-07 17-44

@scrouthtv commented on GitHub (Sep 7, 2019): First thing's first, I checked back on some Linux Terminal emulators and none of them really had this feature. So I guess I was wrong the entire time. I didn't do much for this to happen. I installed fish via [cygwin](https://www.cygwin.com/), changed the cmd.exe in the json config to the path of fish.exe (cygwin provides linux applications as exes) and just tried autocompletion on everything default settings. I'm pretty positive this is just some cygwin compatibility bug because it looks the same with auto completion in zsh... @egmontkob Pushing up the prompt is how I guess it is supposed to work: ![Peek 2019-09-07 17-44](https://user-images.githubusercontent.com/23227405/64477086-9c0ee700-d197-11e9-891f-fc64a8cc76fa.gif)
Author
Owner

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

We actually worked really hard on the in-box windows console to add the option to turn this behavior off. We're probably not going to reintroduce it.

VS Code does have this feature and an option to turn it on/off:

image

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

  // Controls whether the editor will scroll beyond the last line.
  "editor.scrollBeyondLastLine": true,

It will be great to have it in Windows Terminal.

@jiasli commented on GitHub (Oct 12, 2021): > We actually worked really hard on the _in-box windows console_ to add the option to turn this behavior **off**. We're probably not going to reintroduce it. VS Code does have this feature and an option to turn it on/off: ![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, ``` It will be great to have it in Windows Terminal.
Author
Owner

@zadjii-msft commented on GitHub (Oct 12, 2021):

We're actually tracking this in an open issue in #8623. I came around to the idea.

@zadjii-msft commented on GitHub (Oct 12, 2021): We're actually tracking this in an open issue in #8623. I came around to the idea.
Author
Owner

@push-on commented on GitHub (Nov 25, 2021):

my current solution is ctrl + L

@push-on commented on GitHub (Nov 25, 2021): my current solution is ctrl + L
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3719