diff --git a/doc/pages/keys.asciidoc b/doc/pages/keys.asciidoc index 76512929..8de96aa7 100644 --- a/doc/pages/keys.asciidoc +++ b/doc/pages/keys.asciidoc @@ -707,3 +707,7 @@ The following keys are recognized by this mode to help edition. **:: disable auto completion for this prompt + +**:: + expand the typed expansions in currently entered text + (See <>) diff --git a/src/input_handler.cc b/src/input_handler.cc index 3b80d4ee..f95fff6c 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -4,6 +4,7 @@ #include "buffer_manager.hh" #include "buffer_utils.hh" +#include "command_manager.hh" #include "client.hh" #include "event_manager.hh" #include "face_registry.hh" @@ -875,6 +876,18 @@ public: if (context().has_client()) context().client().menu_hide(); } + else if (key == alt('!')) + { + try + { + m_line_editor.reset(expand(m_line_editor.line(), context()), m_empty_text); + } + catch (std::runtime_error& error) + { + context().print_status({error.what(), get_face("Error")}); + return; + } + } else { m_line_editor.handle_key(key);