Fixed a tiny bug in aliasmanager 177/head
authorJanne Koschinski <janne@kuschku.de>
Tue, 2 Feb 2016 16:50:32 +0000 (17:50 +0100)
committerJanne Koschinski <janne@kuschku.de>
Tue, 2 Feb 2016 16:50:32 +0000 (17:50 +0100)
The `/wait` check is to test if the first command is a `/wait`, which would operate synchronously.
But `/wait` matches also on other commands – so, if, for example, we’d have a command like `/waiting`, it would be matched.
Instead we actually want to match on `/wait ` (with space at the end).

src/common/aliasmanager.cpp

index 05ef3c9..cd21f99 100644 (file)
@@ -198,7 +198,7 @@ void AliasManager::expand(const QString &alias, const BufferInfo &bufferInfo, co
 
     while (!expandedCommands.isEmpty()) {
         QString command;
 
     while (!expandedCommands.isEmpty()) {
         QString command;
-        if (expandedCommands[0].trimmed().toLower().startsWith("/wait")) {
+        if (expandedCommands[0].trimmed().toLower().startsWith("/wait ")) {
             command = expandedCommands.join("; ");
             expandedCommands.clear();
         }
             command = expandedCommands.join("; ");
             expandedCommands.clear();
         }