diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-06-02 15:49:35 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-06-02 15:49:35 +0000 |
| commit | f972428823e98c071074a74cce8ae3b0ea871309 (patch) | |
| tree | 54106b4a00f534b9ac7a2c6e6d250083cafe5071 /src/command_manager.cc | |
| parent | 0a848fa45061ce27a99dafae3105fcbc4bacc4c7 (diff) | |
The def command do not override commands by default, use -allow-override
Diffstat (limited to 'src/command_manager.cc')
| -rw-r--r-- | src/command_manager.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc index fe9cc9ee..3c59dbc9 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -10,14 +10,21 @@ namespace Kakoune { -void CommandManager::register_command(const String& command_name, Command command, +bool CommandManager::command_defined(const String& command_name) const +{ + return m_commands.find(command_name) != m_commands.end(); +} + +void CommandManager::register_command(const String& command_name, + Command command, unsigned flags, const CommandCompleter& completer) { m_commands[command_name] = CommandDescriptor { command, flags, completer }; } -void CommandManager::register_commands(const memoryview<String>& command_names, Command command, +void CommandManager::register_commands(const memoryview<String>& command_names, + Command command, unsigned flags, const CommandCompleter& completer) { |
