Fixing BR #282 - tab completion doesn't insert suffix when there is already text...
[quassel.git] / src / uisupport / tabcompleter.cpp
index b9a6fe2..93a0fa4 100644 (file)
@@ -116,7 +116,7 @@ void TabCompleter::complete() {
     nextCompletion++;
     
     // we're completing the first word of the line
-    if(inputLine->text().length() == lastCompletionLength) {
+    if(inputLine->cursorPosition() == lastCompletionLength) {
       inputLine->insert(nickSuffix);
       lastCompletionLength += nickSuffix.length();
     }