From 589aad5f9c98d9002276d1f1a16fb44aa3c3409f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 2 Jun 2012 15:49:56 +0000 Subject: [PATCH] sort command names completion candidates --- src/command_manager.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/command_manager.cc b/src/command_manager.cc index 3c59dbc9f..e60a5dc8f 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -208,6 +208,7 @@ Completions CommandManager::complete(const String& command_line, size_t cursor_p if (command.first.substr(0, prefix.length()) == prefix) result.candidates.push_back(command.first); } + std::sort(result.candidates.begin(), result.candidates.end()); return result; }