Skip to content

Panic when search starts with underscore #441

@ragne

Description

@ragne

Hi, I'm running mcfly on

  • macos 14.5
  • with zsh 5.9
  • and iterm 3.5.3
  • with fuzzy match enabled (I think that's the culprit there)

and simply invoking it with zsh binding (ctrl+r) and searching for anything that starts with underscore _ panics with thread 'main' panicked at src/interface.rs:1008:51:

Sorry I don't have much time right now to look at the what exactly causes that, I can look in a week if no one pics that up.

The best backtrace i could get is this one:

thread 'main' panicked at src/interface.rs:1008:51: byte index 1 is not a char boundary; it is inside '│' (bytes 0..3) of `││\`
stack backtrace:
       0: _rust_begin_unwind
       1: core::panicking::panic_fmt
       2: core::str::slice_error_fail_rt
       3: core::str::slice_error_fail
       4: mcfly::interface::Interface::results
       5: mcfly::interface::Interface::display
       6: mcfly::main
      note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

This is reformatted, so i hope i didn't butcher it while doing so

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions