Skip to content

Commit bebe021

Browse files
authored
Chain to original keymap handler (if one exists) when not changing modes (#419)
1 parent 1ac6f77 commit bebe021

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/debugmode.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,15 @@ function install_repl_mode(repl = Base.active_repl; key::Char = ')')
118118

119119
push!(repl.interface.modes, debug_mode)
120120

121+
key_action = get(main_mode.keymap_dict, key, LineEdit.edit_insert)
121122
enter_debug_mode = function (s, args...)
122123
if isempty(s) || position(LineEdit.buffer(s)) == 0
123124
buf = copy(LineEdit.buffer(s))
124125
LineEdit.transition(s, debug_mode) do
125126
LineEdit.state(s, debug_mode).input_buffer = buf
126127
end
127128
else
128-
LineEdit.edit_insert(s, key)
129+
key_action(s, args...)
129130
end
130131
end
131132
main_mode.keymap_dict = LineEdit.keymap_merge(main_mode.keymap_dict,

0 commit comments

Comments
 (0)