Skip to content

Panic in reedline when a completion suggestion is shorter than the token-being-completed #406

Description

@reubeno

To reproduce:

$ git push origin:<TAB>

This will likely need to be turned into an issue against reedline, but here's the crash report for now until we can triage it:

"name" = "brush"
"operating_system" = "Linux [64-bit]"
"crate_version" = "0.2.15"
"explanation" = """
Panic occurred in file '/usr/src/azl/BUILD/rustc-1.75.0-src/library/core/src/str/mod.rs' at line 666
"""
"cause" = "byte index 8 is out of bounds of `HEAD`"
"method" = "Panic"
"backtrace" = """
   0:     0x564a7fcc11c1 - rust_begin_unwind
   1:     0x564a7f834fd4 - core::panicking::panic_fmt::h276b49f6e7fd64eb
   2:     0x564a7fb5e984 - core::str::slice_error_fail_rt::hc2871e65f6151ea9
   3:     0x564a7f835816 - core::str::slice_error_fail::h2ef53d322f653805
   4:     0x564a7fbca84e - <reedline::menu::columnar_menu::ColumnarMenu as reedline::menu::Menu>::menu_string::{{closure}}::hbe4dad6f085cc81f
   5:     0x564a7fbca533 - <reedline::menu::columnar_menu::ColumnarMenu as reedline::menu::Menu>::menu_string::ha4be51426522791a
   6:     0x564a7fbc6d61 - reedline::painting::painter::Painter::print_menu::hf40e645ee9b6af10
   7:     0x564a7fbc4cc2 - reedline::painting::painter::Painter::repaint_buffer::h1c438ac78621e831
   8:     0x564a7fbb928d - reedline::engine::Reedline::repaint::h826a723c97f824e5
   9:     0x564a7f86c78f - brush_interactive::interactive_shell::InteractiveShell::run_interactively::{{closure}}::h99a72d711537d8bd
  10:     0x564a7f888484 - brush::run::{{closure}}::hbd6ebc62368de427
  11:     0x564a7f884429 - brush::main::h0992de706ebf0320
  12:     0x564a7f8700b3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0c523aa2ecf8b50d

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions