diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-07-24 20:00:41 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-07-24 20:00:41 (GMT) |
commit | aafc6a9b0eb2af64e51943fff89019a937ba137d (patch) | |
tree | b96990277d4d330d5f5d99fc553d8805b9fdb66f /Swift/QtUI | |
parent | 545f20b9051caad8d0223bd332a094c2ffbe8435 (diff) | |
download | swift-aafc6a9b0eb2af64e51943fff89019a937ba137d.zip swift-aafc6a9b0eb2af64e51943fff89019a937ba137d.tar.bz2 |
Don't tab-complete empty words.
Resolves: #468
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 3 |
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; |