mirror of
https://github.com/nushell/nushell.git
synced 2025-05-30 06:39:33 +02:00
# Description Fix cursor panic when handling size zero in binary viewer. Previously, the cursor would panic with arithmetic overflow when handling size 0. This PR fixes this by using `saturating_sub` to safely handle the edge case of size 0. Fixes #14589 # User-Facing Changes - Fixed panic when viewing very small binary inputs in the explore command (when using `0x[f] | explore`) # Tests + Formatting Added tests to verify: - Cursor handling of size 0 - Safe movement operations with size 0 - Edge case handling with size 1 ✅ Verified all checks pass: - `cargo fmt --all -- --check` - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` - `cargo test --package nu-explore --lib cursor`
Implementation of the interactive explore
command pager.
Internal Nushell crate
This crate implements components of Nushell and is not designed to support plugin authors or other users directly.