summaryrefslogtreecommitdiffstats
path: root/src/crsm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crsm.cpp')
-rw-r--r--src/crsm.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/crsm.cpp b/src/crsm.cpp
index aef74c1..9b6022b 100644
--- a/src/crsm.cpp
+++ b/src/crsm.cpp
@@ -1525,6 +1525,12 @@ CmdFunctionRef* CRSM::findCommand(QStringList&& cmd, ClientInterface interface,
else
{
const QStringList& guesses = guessCmd(cmdPart, interface);
+ cmd.removeLast();
+ if(const auto result = findCommand(std::move(cmd), interface, realCmd, corrections); result)
+ {
+ return result;
+ }
+
if(guesses.length() == 1)
{
QString guess = guesses.first();
@@ -1538,9 +1544,7 @@ CmdFunctionRef* CRSM::findCommand(QStringList&& cmd, ClientInterface interface,
{
corrections.append(guesses);
}
-
- cmd.removeLast();
- return findCommand(std::move(cmd), interface, realCmd, corrections);
+ return nullptr;
}
}
}