[GH-ISSUE #656] table scrolling wraps now? #483

Closed
opened 2026-03-04 01:05:22 +03:00 by kerem · 5 comments
Owner

Originally created by @toffaletti on GitHub (Sep 26, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/656

I updated to latest commit, implemented TableContent interface, and now I see this new behavior:

  • page down stops at end of table (like before)
  • page up does not stop, but wraps back to the bottom so you can infinitely loop top to bottom using page up.
  • single step scrolling also wraps in both directions
Originally created by @toffaletti on GitHub (Sep 26, 2021). Original GitHub issue: https://github.com/rivo/tview/issues/656 I updated to latest commit, implemented TableContent interface, and now I see this new behavior: - page down stops at end of table (like before) - page up does not stop, but wraps back to the bottom so you can infinitely loop top to bottom using page up. - single step scrolling also wraps in both directions
kerem closed this issue 2026-03-04 01:05:23 +03:00
Author
Owner

@rivo commented on GitHub (Sep 26, 2021):

Yes, that's true. Before this merge, it only wrapped in one direction which was quite inconsistent. I.e. you could move right and end up on the next line but if you moved left, you wouldn't be sent back. So that was unexpected and, in my opinion, undesirable.

If this is a problem in your application, please elaborate a bit why.

<!-- gh-comment-id:927336737 --> @rivo commented on GitHub (Sep 26, 2021): Yes, that's true. Before this merge, it only wrapped in one direction which was quite inconsistent. I.e. you could move right and end up on the next line but if you moved left, you wouldn't be sent back. So that was unexpected and, in my opinion, undesirable. If this is a problem in your application, please elaborate a bit why.
Author
Owner

@rivo commented on GitHub (Sep 26, 2021):

Yes, that's true. Before this merge, it only wrapped in one direction which was quite inconsistent. I.e. you could move right and end up on the next line but if you moved left, you wouldn't be sent back. So that was unexpected and, in my opinion, undesirable.

If this is a problem in your application, please elaborate a bit why.

<!-- gh-comment-id:927336777 --> @rivo commented on GitHub (Sep 26, 2021): Yes, that's true. Before this merge, it only wrapped in one direction which was quite inconsistent. I.e. you could move right and end up on the next line but if you moved left, you wouldn't be sent back. So that was unexpected and, in my opinion, undesirable. If this is a problem in your application, please elaborate a bit why.
Author
Owner

@rivo commented on GitHub (Sep 26, 2021):

Yes, that's true. Before this merge, it only wrapped in one direction which was quite inconsistent. I.e. you could move right and end up on the next line but if you moved left, you wouldn't be sent back. So that was unexpected and, in my opinion, undesirable.

If this is a problem in your application, please elaborate a bit why.

<!-- gh-comment-id:927336890 --> @rivo commented on GitHub (Sep 26, 2021): Yes, that's true. Before this merge, it only wrapped in one direction which was quite inconsistent. I.e. you could move right and end up on the next line but if you moved left, you wouldn't be sent back. So that was unexpected and, in my opinion, undesirable. If this is a problem in your application, please elaborate a bit why.
Author
Owner

@toffaletti commented on GitHub (Sep 26, 2021):

It would be nice to have control over the behavior. In my case, holding page up to get back to the top of the table and have it stop was a desirable behavior because there are many pages and you might be in the middle somewhere and want to quickly get to the top. Now it just keeps wrapping to the bottom though.

<!-- gh-comment-id:927338265 --> @toffaletti commented on GitHub (Sep 26, 2021): It would be nice to have control over the behavior. In my case, holding page up to get back to the top of the table and have it stop was a desirable behavior because there are many pages and you might be in the middle somewhere and want to quickly get to the top. Now it just keeps wrapping to the bottom though.
Author
Owner

@rivo commented on GitHub (Sep 26, 2021):

Makes sense. (Although pressing g / G will move the selection to the beginning / end.)

The latest commit introduces a way to control wrapping behaviour. After some consideration, I decided that the default should be that there is no wrapping. (I was never quite happy with the previous implementations.)

<!-- gh-comment-id:927348316 --> @rivo commented on GitHub (Sep 26, 2021): Makes sense. (Although pressing <kbd>g</kbd> / <kbd>G</kbd> will move the selection to the beginning / end.) The latest commit introduces a way to control wrapping behaviour. After some consideration, I decided that the default should be that there is no wrapping. (I was never quite happy with the previous implementations.)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#483
No description provided.