Skip to content

Commit a1818b9

Browse files
authored
Drop the REPL search keymap (#4425)
1 parent baa7981 commit a1818b9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ext/REPLExt/REPLExt.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ function create_mode(repl::REPL.AbstractREPL, main::LineEdit.Prompt)
152152
hp.mode_mapping[:pkg] = pkg_mode
153153
pkg_mode.hist = hp
154154

155-
search_prompt, skeymap = LineEdit.setup_search_keymap(hp)
155+
skeymap = if !isdefined(REPL, :History)
156+
last(LineEdit.setup_search_keymap(hp)) # TODO: Remove
157+
end
156158
prefix_prompt, prefix_keymap = LineEdit.setup_prefix_keymap(hp, pkg_mode)
157159

158160
pkg_mode.on_done = (s, buf, ok) -> Base.@invokelatest(on_done(s, buf, ok, repl))
@@ -183,7 +185,11 @@ function create_mode(repl::REPL.AbstractREPL, main::LineEdit.Prompt)
183185
end
184186
end
185187

186-
b = Dict{Any, Any}[skeymap, repl_keymap]
188+
b = Dict{Any, Any}[]
189+
if !isdefined(REPL, :History)
190+
push!(b, skeymap)
191+
end
192+
push!(b, repl_keymap)
187193
if BRACKET_INSERT_SUPPORTED && repl.options.auto_insert_closing_bracket
188194
push!(b, LineEdit.bracket_insert_keymap)
189195
end

0 commit comments

Comments
 (0)