wezterm
wezterm copied to clipboard
Scrolling forward (past the line) and using keyboard
Is your feature request related to a problem? Please describe
- I cant scroll using keyboard shortcuts --> have to use the mouse/touchpad
- Also, the command prompt gets stuck in the bottom making it uneasy on the eye
Describe the solution you'd like
Ability to:
- scroll through the screen via some keyboard shortcut like Ctrl + arrow keys, and
- scroll past the last line upto the point that only last line is still visible on the screen
References: both of above are supported in:
- text editors (like notepad3
^arrow
, geanyalt-arrow
, & vscodium^arrow
) - windows conhost
^arrow
too, though that is a bit extreme and supports scrolling endlessly - which aint wanted either
Note: in editors too, scrolling the screen/viewerport is different than changing the cursor position
Describe alternatives you've considered
clear
and ^l
- which clears the screen, but sometimes i dont want to alter the contents, just scroll
(^
= Ctrl)
Additional context
Add any other context or screenshots about the feature request here.
Versions:
- OS: windows 10 20H2
- wezterm: 20220624-141144-bd1b7c5d
kinda relevant maybe: https://github.com/wez/wezterm/issues/427
There are a number of key assignments for scrolling: ScrollByLine ScrollByPage (SHIFT+PageUp/PageDown are bound to this by default) ScrollToBottom ScrollToPrompt ScrollToTop
is any of these setup by default i.e. available to try directly or will i have to set those up?
seems it's the latter, but still, asking for confirmation
and i dont think any of these still scrolls past the last line, am i right??
Please read my comment again; it explains about the defaults. The full list of defaults can be found at https://wezfurlong.org/wezterm/config/default-keys.html
It is not possible to scroll past the last line, as it is the last line and there are no lines after it.
FWIW I also like to 'scroll' past the last line a bit (I use it to 'clear' my mind, give the screen some space), the way I do it is that in my shell I have mapped a key to send a few ANSI escape sequences to scroll the content of the terminal up. See:
- https://github.com/bew/dotfiles/blob/1e1117fec1a043027a40e27434acf85d5fdeb00d/zsh/rc/mappings.zsh#L86
- https://github.com/bew/dotfiles/blob/1e1117fec1a043027a40e27434acf85d5fdeb00d/zsh/rc/mappings.zsh#L137
Note: that I'd love to be able to scroll it back down while keeping the scrollback, however no escape sequence can do that. Kitty implemented one, and I asked to have it in westerm some time ago, not impl so far (maybe I'll just do it some day).. See: #1513
Not sure it's what you're looking for, maybe it'll help
I also implemented a clear the terminal but do not scrub scrollback content
to replace Ctrl-L
in my shell:
https://github.com/bew/dotfiles/blob/1e1117fec1a043027a40e27434acf85d5fdeb00d/zsh/rc/mappings.zsh#L543
(for ZSH, taking care of the current cursor position, its position in the prompt buffer (if on a multiline buffer), and using the same mecanism as above to scroll the content until the cursor is at the top)
@bew: Thanks for that snippet! This is what I came up with: seq 3 `tput lines`; tput clear;
. Set 3
to 2
when not invoking manually, using a key binding for example.
umh, i am just saying to push all the content above. as i already said, even the conhost (windows default terminal) does that (& all those editors too obv).
so...
i mean, i understand if there's some technical implementational problem for doing that, but i dont understand the logic behind following reply 😅😇
anyways, i will record the screen and share it here for better clearing up and illustrating what i mean
thanks
Wez Furlong wrote:
It is not possible to scroll past the last line, as it is the last line and there are no lines after it.
here's the recording video with the editors and windows conhost terminal,
speed it up while watching to save time, and avoid jitteriness - i had no idea that recording @24fps would be that bad sorry with excessive scrolling
https://user-images.githubusercontent.com/19423063/178258999-d71e56b0-53f9-43c6-be8b-94a52401b0c8.mp4
oh i forgot to show this, conhost has this property toggleable too, by the name of Disable scroll forward
![](https://user-images.githubusercontent.com/19423063/178640246-1437d5af-f053-401f-98cb-972fdf867484.png)
2022.12.05
so, collection of names it's called with:
- "scroll forward" in conhost
- "scroll beyond last line" in vscodium
- "scrolling at last line" in geany
- "vertical overscroll (scroll below end of file)" in TeXStudio
There is an issue with solution posted by @bew, and myself, it doesn't work when a program is running. This won't be a problem if there is a terminal-native option.
hey @ wez , can u have an another look at it 😃
lack of this in the terminals also make the video tutorials super hard to follow with subtitles turned on
also bad if you are a content creator for such tutorials...
as can be seen in this screenshot took from this video: CpTfQ-q6MPU