Skip to content

REPL: BoundsError in history search #29347

Closed
@KristofferC

Description

To reproduce:

  • Ctrl-R to enter reverse mode
  • Paste som gibberish
  • Press Ctrl-R again
': verse-i-search)` sdgfdfgdfgfdgfdgfd        ┌ Error: Error in the keymap
│   exception =
│    BoundsError: attempt to access ""
│      at index [0]
│    Stacktrace:
│     [1] prevind(::String, ::Int64, ::Int64) at ./strings/basic.jl:460
│     [2] prevind(::String, ::Int64) at ./strings/basic.jl:455
│     [3] history_search(::REPL.REPLHistoryProvider, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool, ::Bool) at /Users/kristoffer/julia/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:631
│     [4] history_next_result(::REPL.LineEdit.MIState, ::REPL.LineEdit.SearchState) at /Users/kristoffer/julia/usr/share/julia/stdlib/v1.1/REPL/src/LineEdit.jl:1565
│     [5] (::getfield(REPL.LineEdit, Symbol("##44#75")))(::Any, ::Any, ::Any) at /Users/kristoffer/julia/usr/share/julia/stdlib/v1.1/REPL/src/LineEdit.jl:1777
...

The paste is not necessary, you can also type something that doesn't make any result in the reverse search come up and trigger the same behavior. Pasting is easier though.

Metadata

Assignees

No one assigned

    Labels

    REPLJulia's REPL (Read Eval Print Loop)bugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions