summary refs log tree commit diff
path: root/src/timeline/InputBar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/timeline/InputBar.cpp')
-rw-r--r--src/timeline/InputBar.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp

index 6980c364..2f3b6eae 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp
@@ -776,7 +776,9 @@ InputBar::getCommandAndArgs(const QString &currentText) const if (!currentText.startsWith('/')) return {{}, currentText}; - int command_end = currentText.indexOf(QRegularExpression(QStringLiteral("\\s"))); + static QRegularExpression spaceRegex(QStringLiteral("\\s")); + + int command_end = currentText.indexOf(spaceRegex); if (command_end == -1) command_end = currentText.size(); auto name = currentText.mid(1, command_end - 1);