tui-scrollview
tui-scrollview copied to clipboard
fix: content scrolling so it stops at bottom of viewable area instead…
… of at the top.
Before fix the content would scroll on the last page to the top of the viewable area, leaving a large blank space on the last page. This fixes the scrolling so the bottom of the last page stops at the bottom of the viewable area. Adjustment is made to the scrollbar thumb so it stops at the bottom of the scroll track.
https://github.com/joshka/tui-scrollview/pull/30 changes the implementation a bunch, so I'm going to redo this and credit you for the fix.
Ok sounds good! I was trying to add a test to try the simplification but I couldn’t figure out how to get the scroll thumb to size correctly, it kept drawing two cells tall instead of one.
I merged the latest changes to my fork and I added a scroll_to_bottom test to verify the changes that I am proposing.
I also added a fixture that prints the row numbers to make it easier to verify that the scroll position is at the right location.
I simplified the logic around the y position that I updated and I cleaned up some messages that Clippy was complaining about.
Let me know what you think.
Hey there, it might be some time before I respond to this, but I will get back to it as soon as I can.
Any updates?