You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent a little time trying to solve this, and... it's a bit tricky.
The crux of the problem is that because individual log messages can wrap onto multiple lines, I don't know how tall the rendered list is going to be ahead of time. And without that information, I don't know what the maximum scroll offset should be.
Can probably hack something together but I'm not sure what a robust solution in Ratatui would look like 🤔
Took another look at this. It seems like Ratatui just doesn't have a great solution for this right now. Relevant Ratatui RFCs: ratatui/ratatui#293 ratatui/ratatui#174
To fix this in the near future, we may need to handle text wrapping ourselves along these lines: ratatui/ratatui#293 (comment)
It seems like the Ratatui folks want to use textwrap so that's worth a try.
How to reproduce
Here's what
systemctl-tui
shows when first displaying the logs of, for example, theacpid
service:Upon pressing
<End>
to scroll to bottom, here's what I get:It actually scrolled past the last log, and I have to scroll back up using
<PageUp>
to see the actual last (== oldest) log messages:Expected behavior
Scrolling to bottom should end-up with the last/oldest log message displayed at the bottom of the screen/widget, like this:
Incidentally, pressing
<PageDown>
should also be a no-op if the last line is already displayed.The text was updated successfully, but these errors were encountered: