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();
}