diff --git a/src/Att.cpp b/src/Att.cpp index 90c61877b..3c979aeec 100644 --- a/src/Att.cpp +++ b/src/Att.cpp @@ -25,6 +25,7 @@ // //////////////////////////////////////////////////////////////////////////////// +#include #include #include #include @@ -253,6 +254,7 @@ bool Att::validNameValue ( { std::string error = "Ambiguous attribute '" + name + "' - could be either of "; // TODO i18n + std::sort (matches.begin (), matches.end ()); std::string combined; join (combined, ", ", matches); @@ -278,6 +280,7 @@ bool Att::validNameValue ( { std::string error = "Ambiguous modifier '" + mod + "' - could be either of "; // TODO i18n + std::sort (matches.begin (), matches.end ()); std::string combined; join (combined, ", ", matches); error += combined; diff --git a/src/Cmd.cpp b/src/Cmd.cpp index d7b30a6bd..fc62e7d1d 100644 --- a/src/Cmd.cpp +++ b/src/Cmd.cpp @@ -25,13 +25,14 @@ // //////////////////////////////////////////////////////////////////////////////// +#include // TODO Remove #include -#include "Cmd.h" -#include "Context.h" -#include "util.h" -#include "text.h" -#include "i18n.h" -#include "main.h" +#include +#include +#include +#include +#include +#include extern Context context; @@ -94,6 +95,7 @@ void Cmd::parse (const std::string& input) { std::string error = "Ambiguous command '" + candidate + "' - could be either of "; // TODO i18n + std::sort (matches.begin (), matches.end ()); std::string combined; join (combined, ", ", matches); throw error + combined; diff --git a/src/text.cpp b/src/text.cpp index 01505dd00..657db2ce6 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -25,6 +25,7 @@ // //////////////////////////////////////////////////////////////////////////////// +#include #include #include #include @@ -397,6 +398,8 @@ void guess ( else { + std::sort (matches.begin (), matches.end ()); + std::string error = "Ambiguous "; // TODO i18n error += type; error += " '";