Skip to content

Improve scroll at bottom to support scrolling without focus#104

Merged
sudo-tee merged 4 commits intosudo-tee:mainfrom
guillaumeboehm:improve_autoscroll
Nov 7, 2025
Merged

Improve scroll at bottom to support scrolling without focus#104
sudo-tee merged 4 commits intosudo-tee:mainfrom
guillaumeboehm:improve_autoscroll

Conversation

@guillaumeboehm
Copy link
Contributor

Took a shot at improving a bit the autoscroll logic, I'm using the mouse to scroll from time to time and the previous implementation was not supporting that.

I also added a config to always autoscroll, I felt like it could be useful. If you don't like it it's separated in its own commit.

@cameronr
Copy link
Collaborator

cameronr commented Nov 5, 2025

Nice! I've also been a little annoyed when i've scrolled the view up (but not repositioned the cursor).

My only suggestion is that I don't think output_window_at_bottom needs to be in state. I think it would be fine to have something like output_window.viewport_at_bottom and renderer can just check that.

@guillaumeboehm
Copy link
Contributor Author

Nice! I've also been a little annoyed when i've scrolled the view up (but not repositioned the cursor).

My only suggestion is that I don't think output_window_at_bottom needs to be in state. I think it would be fine to have something like output_window.viewport_at_bottom and renderer can just check that.

Yep that's easier to maintain and I could remove some manual reset 😄 thanks for the review!

@sudo-tee
Copy link
Owner

sudo-tee commented Nov 6, 2025

@guillaumeboehm
This looks pretty reasonable to me.

One minor change. I would ask.

There is a lot of uneeded comments in the MR.

I usually try to put comments on things that are not obious.

@sudo-tee sudo-tee merged commit bdbd9ef into sudo-tee:main Nov 7, 2025
5 checks passed
@sudo-tee
Copy link
Owner

sudo-tee commented Nov 7, 2025

Thanks for fixing my nitpicking :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants