Add support for adding a space when tab-completing mid-sentence
[quassel.git] / src / uisupport / tabcompleter.cpp
index 7426ed4..5f7b083 100644 (file)
@@ -130,6 +130,8 @@ void TabCompleter::complete() {
     if(_completionType == UserTab && _lineEdit->cursorPosition() == _lastCompletionLength) {
       _lineEdit->insert(_nickSuffix);
       _lastCompletionLength += _nickSuffix.length();
+    } else if (s.addSpaceMidSentence()) {
+      _lineEdit->insert(" ");
     }
 
   // we're at the end of the list -> start over again