Make CommandObjectMultiword::GetSubcommandSP() more robust by appending the
exactly-matched sub_cmd to the passed in 'matches' string list.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120516 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectMultiword.cpp b/source/Commands/CommandObjectMultiword.cpp
index aafd0f8..db500a7 100644
--- a/source/Commands/CommandObjectMultiword.cpp
+++ b/source/Commands/CommandObjectMultiword.cpp
@@ -49,8 +49,12 @@
     if (!m_subcommand_dict.empty())
     {
         pos = m_subcommand_dict.find (sub_cmd);
-        if (pos != m_subcommand_dict.end())
+        if (pos != m_subcommand_dict.end()) {
+            // An exact match; append the sub_cmd to the 'matches' string list.
+            if (matches)
+                matches->AppendString(sub_cmd);
             return_cmd_sp = pos->second;
+        }
         else
         {