navi icon indicating copy to clipboard operation
navi copied to clipboard

thread 'main' panicked on specific cheatsheet

Open pushou opened this issue 4 months ago • 1 comments

Describe the bug One of my cheatsheet produces error

export RUST_BACKTRACE=1; navi
thread 'main' panicked at 'byte index 2 is not a char boundary; it is inside '\u{a0}' (bytes 1..3) of `# do not fragment off`', src/parser.rs:110:22
                 stack backtrace:

To Reproduce Steps to reproduce the behavior:

  1. Create a cheatsheet with
% bgp,cisco,pushou

# other
route-map nodf permit 10
set ip df 0
interface FastEthernet2
ip policy route-map nodf
  1. Launch navi

  2. Use UP arrow key

  3. See error trace

export RUST_BACKTRACE=1; navi
thread 'main' panicked at 'byte index 2 is not a char boundary; it is inside '\u{a0}' (bytes 1..3) of `# do not fragment off`', src/parser.rs:110:22
                 stack backtrace:
                               OAOOOOOOOOOO

Remove lines in the cheatsheet and Navi worked as expected

Expected behavior run Navi without error

Versions:

  • OS: Ubuntu 24
  • Navi 2.0.23
  • zsh 5.9 (x86_64-ubuntu-linux-gnu) same behavior under bash

thanks for Navi !

pushou avatar Oct 01 '24 19:10 pushou