linutil
linutil copied to clipboard
panic when scrolling
Describe the bug
- When running a command the scrolling causes a panic.
- Turns out it is caused by a bug in vt100 https://github.com/doy/vt100-rust/pull/11
To Reproduce
Steps to reproduce the behavior:
- Run any command that outputs a very long message.
- Press pageup 3 to 4 times.
- See error.
Expected behavior
- No panic and scroll up
Screenshots
Additional context
Workarounds
- Limit the scroll offset up to the maximum number of rows of terminal https://github.com/ChrisTitusTech/linutil/blob/d3a801d49b6b60e92ac6f7d00b1edff211e6a721/tui/src/running_command.rs#L256
- Remove the scroll functionality for now.
Solution
- Fork the vt100 and make our own crate just like the how other big projects are doing ( Big changes needed in linutil )
- Switching to a different parser ( Not ideal ).
Checklist
- [x] I checked for duplicate issues.
- [x] I checked already existing discussions.
- [x] This issue is not included in the roadmap.
- [x] This issue is present on both stable and development branches.