summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2012-09-03 21:55:18 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-09-05 07:43:34 (GMT)
commite9fb092085e47ed6f4da8592a5f38aebec4e8885 (patch)
tree51f610fe0c6b27da7b6fb236660ad0d7bfeef575 /Swift/QtUI
parent3aaaa44b69e18140533f3b0ef015364c609a5e38 (diff)
downloadswift-contrib-e9fb092085e47ed6f4da8592a5f38aebec4e8885.zip
swift-contrib-e9fb092085e47ed6f4da8592a5f38aebec4e8885.tar.bz2
Enable completion of nicknames not starting with a letter.
Resolves: #813 License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index ddfe158..2bb9ae0 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -311,7 +311,7 @@ void QtChatWindow::tabComplete() {
cursor = tabCompleteCursor_;
} else {
cursor = input_->textCursor();
- cursor.select(QTextCursor::WordUnderCursor);
+ while(cursor.movePosition(QTextCursor::Left, QTextCursor::KeepAnchor) && cursor.document()->characterAt(cursor.position() - 1) != ' ') { }
}
QString root = cursor.selectedText();
if (root.isEmpty()) {