@@ -264,7 +264,7 @@ const COMMAND_GROUPS =
264264 :edit_upper_case , :edit_lower_case , :edit_title_case , :edit_indent ,
265265 :edit_transpose_lines_up! , :edit_transpose_lines_down! ],
266266 :copy => [:edit_copy_region ],
267- :misc => [:complete_line , :setmark , :edit_undo! , :edit_redo! ])
267+ :misc => [:complete_line , :complete_line_hint , : setmark , :edit_undo! , :edit_redo! ])
268268
269269const COMMAND_GROUP = Dict {Symbol,Symbol} (command=> group for (group, commands) in COMMAND_GROUPS for command in commands)
270270command_group (command:: Symbol ) = get (COMMAND_GROUP, command, :nogroup )
@@ -382,6 +382,7 @@ function check_for_hint(s::MIState)
382382 # Requires making space for them earlier in refresh_multi_line
383383 return clear_hint (st)
384384 end
385+ set_action! (s, :complete_line_hint )
385386 completions, partial, should_complete = complete_line (st. p. complete, st, s. active_module; hint = true ):: Tuple{Vector{String},String,Bool}
386387 isempty (completions) && return clear_hint (st)
387388 # Don't complete for single chars, given e.g. `x` completes to `xor`
@@ -2871,7 +2872,9 @@ function prompt!(term::TextTerminal, prompt::ModalInterface, s::MIState = init_s
28712872 try
28722873 status = fcn (s, kdata)
28732874 catch e
2874- @error " Error in the keymap" exception= e,catch_backtrace ()
2875+ if s. current_action != :complete_line_hint
2876+ @error " Error in the keymap" exception= e,catch_backtrace ()
2877+ end
28752878 # try to cleanup and get `s` back to its original state before returning
28762879 transition (s, :reset )
28772880 transition (s, old_state)
0 commit comments