From 1083b65ff728a303caf700adf4179f337c6528fe Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Wed, 31 Dec 2008 01:12:48 +0100 Subject: [PATCH] fixing a bug related to wait in combination with aliases that expand to multiple commands --- src/core/userinputhandler.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/userinputhandler.cpp b/src/core/userinputhandler.cpp index 4b4c0796..de56d85b 100644 --- a/src/core/userinputhandler.cpp +++ b/src/core/userinputhandler.cpp @@ -504,7 +504,14 @@ void UserInputHandler::timerEvent(QTimerEvent *event) { QObject::timerEvent(event); return; } - Command command = _delayedCommands.take(event->timerId()); + BufferInfo bufferInfo = _delayedCommands[event->timerId()].bufferInfo; + QString rawCommand = _delayedCommands[event->timerId()].command; + _delayedCommands.remove(event->timerId()); event->accept(); - handleUserInput(command.bufferInfo, command.command); + + // the stored command might be the result of an alias expansion, so we need to split it up again + QStringList commands = rawCommand.split(QRegExp("; ?")); + foreach(QString command, commands) { + handleUserInput(bufferInfo, command); + } } -- 2.20.1