Open qfel opened 3 months ago
You seem to have narrowed it down quite a bit already, I think @rgwood last worked on simplifying the internal navigation mechanisms if you have questions.
This was Reilly's cursor overhaul PR https://github.com/nushell/nushell/pull/12979 that may provide some insight.
I was looking at fixing, but realized the current design is a bit unhandy:
Yeah it's got some problems! 😅
I tried to clean up the cursor code in the above PR to make it easier to follow, but it's still far from perfect and it's possible I introduced a bug.
Any thoughts about getting rid of Cursor as a separate entity so that we can preserve the original window size?
I'd be OK with this.
Describe the bug
explore
panics when scrolled past the endHow to reproduce
$env | explore
Expected behavior
Do nothing (already viewing the end of table)
Screenshots
This is on
Configuration
Additional context
The problem seems to be WindowCursor manages both "view" and a "window" that sometimes seems to be assumed to fit within the view. But sometimes it isn't clamped on update and this seems to trigger the debug_assert.
I was looking at fixing, but realized the current design is a bit unhandy:
Any thoughts about getting rid of Cursor as a separate entity so that we can preserve the original window size?