summaryrefslogtreecommitdiff
path: root/src/command_manager.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-11-04 16:00:34 +0800
committerMaxime Coste <mawww@kakoune.org>2017-11-04 16:02:21 +0800
commit6bac767124a1e8b776b7169f2cae6dde245cc195 (patch)
tree0e1df608bb2921c03b943b19e1041ac1d7bd4b03 /src/command_manager.hh
parent7f51e51fcbfc1b3070711d2421dd248cdb1b8b22 (diff)
CommandManager: tweak naming
Diffstat (limited to 'src/command_manager.hh')
-rw-r--r--src/command_manager.hh14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/command_manager.hh b/src/command_manager.hh
index eb1fadb3..d3ecab18 100644
--- a/src/command_manager.hh
+++ b/src/command_manager.hh
@@ -19,9 +19,9 @@ namespace Kakoune
class Context;
using CommandParameters = ConstArrayView<String>;
-using Command = std::function<void (const ParametersParser& parser,
- Context& context,
- const ShellContext& shell_context)>;
+using CommandFunc = std::function<void (const ParametersParser& parser,
+ Context& context,
+ const ShellContext& shell_context)>;
using CommandCompleter = std::function<Completions (const Context& context,
CompletionFlags,
@@ -84,7 +84,7 @@ public:
bool command_defined(StringView command_name) const;
- void register_command(String command_name, Command command,
+ void register_command(String command_name, CommandFunc func,
String docstring,
ParameterDesc param_desc,
CommandFlags flags = CommandFlags::None,
@@ -101,16 +101,16 @@ private:
const ShellContext& shell_context,
DisplayCoord pos);
- struct CommandDescriptor
+ struct Command
{
- Command command;
+ CommandFunc func;
String docstring;
ParameterDesc param_desc;
CommandFlags flags;
CommandHelper helper;
CommandCompleter completer;
};
- using CommandMap = HashMap<String, CommandDescriptor, MemoryDomain::Commands>;
+ using CommandMap = HashMap<String, Command, MemoryDomain::Commands>;
CommandMap m_commands;
String m_last_complete_command;
int m_command_depth = 0;