summaryrefslogtreecommitdiff
path: root/src/command_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/command_manager.cc')
-rw-r--r--src/command_manager.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc
index 7419e0bc..ef2fef5c 100644
--- a/src/command_manager.cc
+++ b/src/command_manager.cc
@@ -609,6 +609,11 @@ Completions CommandManager::complete(const Context& context,
return Completions{};
const String& command_name = tokens[cmd_idx].content();
+ if (command_name != m_last_complete_command)
+ {
+ m_last_complete_command = command_name;
+ flags |= CompletionFlags::Start;
+ }
auto command_it = find_command(context, command_name);
if (command_it == m_commands.end() or
@@ -652,6 +657,11 @@ Completions CommandManager::complete(const Context& context,
else
{
const String& command_name = params[0];
+ if (command_name != m_last_complete_command)
+ {
+ m_last_complete_command = command_name;
+ flags |= CompletionFlags::Start;
+ }
auto command_it = find_command(context, command_name);
if (command_it != m_commands.end() and command_it->second.completer)