diff options
| author | Maxime Coste <mawww@kakoune.org> | 2016-12-23 16:23:31 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2016-12-23 16:23:31 +0000 |
| commit | d17bed9b80183bb80ae560200d08bacfaac679c2 (patch) | |
| tree | 0855c46ed2372a216b407257c514ccca88d06e1f /src/command_manager.hh | |
| parent | 62df6dbb46ce00be1031e907d222116864431888 (diff) | |
Display the command prompt in error face when the command is not found
Fixes #1021
Diffstat (limited to 'src/command_manager.hh')
| -rw-r--r-- | src/command_manager.hh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/command_manager.hh b/src/command_manager.hh index 4a326613..55d62921 100644 --- a/src/command_manager.hh +++ b/src/command_manager.hh @@ -8,6 +8,7 @@ #include "shell_manager.hh" #include "parameters_parser.hh" #include "string.hh" +#include "optional.hh" #include "utils.hh" #include "unordered_map.hh" @@ -38,7 +39,7 @@ enum class CommandFlags template<> struct WithBitOps<CommandFlags> : std::true_type {}; -using CommandInfo = std::pair<String, String>; +struct CommandInfo { String name, info; }; struct Token { @@ -91,8 +92,8 @@ public: CommandParameters params, size_t token_to_complete, ByteCount pos_in_token); - CommandInfo command_info(const Context& context, - StringView command_line) const; + Optional<CommandInfo> command_info(const Context& context, + StringView command_line) const; bool command_defined(const String& command_name) const; |
