summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swift/QtUI/QtChatWindow.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index a294898..5e96b3e 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -120,6 +120,9 @@ void QtChatWindow::tabComplete() {
cursor.select(QTextCursor::WordUnderCursor);
QString root = cursor.selectedText();
bool firstWord = cursor.selectionStart() == 0;
+ if (root.isEmpty()) {
+ return;
+ }
QString suggestion = P2QSTRING(completer_->completeWord(Q2PSTRING(root)));
if (root == suggestion) {
return;