KristofferC / OhMyREPL.jl

Syntax highlighting and other enhancements for the Julia REPL
https://kristofferc.github.io/OhMyREPL.jl/latest/
Other
745 stars 57 forks source link

Fail to press `UP` or `DOWN` keys in REPL after `v1.11.0-rc1` #349

Closed huangyxi closed 2 days ago

huangyxi commented 3 days ago

Moving up and down failed when pressing the UP or DOWN key in the REPL after importing OhMyREPL, since v1.11.0-rc1 or v1.12.0-DEV.

Reproduction

  1. Run julia with version v1.11.0-rc1.
  2. Use the command using OhMyREPL.
  3. Press the UP key (\e[A) or DOWN key (\e[B).
$ julia +1.11
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.0-rc1 (2024-06-25)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using OhMyREPL

>>>>>> PRESS UP KEY <<<<<<

julia> ┌ Error: Error in the keymap
│   exception =
│    MethodError: no method matching enter_prefix_search(::REPL.LineEdit.MIState, ::REPL.LineEdit.HistoryPrompt, ::Bool)
│    The function `enter_prefix_search` exists, but no method is defined for this combination of argument types.
│
│    Closest candidates are:
│      enter_prefix_search(::REPL.LineEdit.MIState, ::REPL.LineEdit.PrefixHistoryPrompt, ::Bool)
│       @ REPL ~/.julia/juliaup/julia-1.11.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2203
│
│    Stacktrace:
│     [1] (::OhMyREPL.Prompt.var"#55#57"{REPL.LineEdit.HistoryPrompt})(::Any, ::Any, ::Vararg{Any})
│       @ OhMyREPL.Prompt ~/.julia/packages/OhMyREPL/6UG7a/src/repl.jl:291
│     [2] #invokelatest#2
│       @ ./essentials.jl:1043 [inlined]
│     [3] invokelatest
│       @ ./essentials.jl:1040 [inlined]
│     [4] (::REPL.LineEdit.var"#30#31"{OhMyREPL.Prompt.var"#55#57"{REPL.LineEdit.HistoryPrompt}, String})(s::Any, p::Any)
│       @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:1705
│     [5] macro expansion
│       @ ~/.julia/juliaup/julia-1.11.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2855 [inlined]
│     [6] macro expansion
│       @ ./lock.jl:273 [inlined]
│     [7] (::REPL.LineEdit.var"#282#284"{REPL.Terminals.TTYTerminal, REPL.LineEdit.ModalInterface, REPL.LineEdit.MIState, ReentrantLock, REPL.LineEdit.Prompt})()
│       @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2845
└ @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2857
julia>
julia>
LilithHafner commented 2 days ago

I also ran into this.