fakevim: fix endless loop in certain search&replace operations

Task-number: QTCREATORBUG-5697
Change-Id: I25e9ef4ef042efa2b4dd670f5177e5e170fbaaf0
(cherry picked from commit d8fdd0acdc)
Reviewed-on: http://codereview.qt.nokia.com/2574
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
hjk
2011-08-03 13:14:19 +02:00
committed by Eike Ziller
parent ac86633aba
commit 30b0370bed

View File

@@ -3226,7 +3226,7 @@ bool FakeVimHandler::Private::handleExSubstituteCommand(const ExCommand &cmd)
}
}
text = text.left(pos) + repl + text.mid(pos + matched.size());
pos += matched.size();
pos += repl.size();
if (!global)
break;
}