linutil icon indicating copy to clipboard operation
linutil copied to clipboard

panic when scrolling

Open jeevithakannan2 opened this issue 4 months ago • 9 comments

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:

  1. Run any command that outputs a very long message.
  2. Press pageup 3 to 4 times.
  3. See error.

Expected behavior

  • No panic and scroll up

Screenshots

image

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.

jeevithakannan2 avatar Oct 02 '24 12:10 jeevithakannan2