Commit 97d0cfa3 authored by Jeff's avatar Jeff
Browse files

Fix first word completion

parent 05f2bc83
......@@ -46,6 +46,7 @@ void LineEditCompleter::keyPressEvent(QKeyEvent * event)
//Truncate the line to last space or whole string
QString textValue = text();
int lastIndexof = textValue.lastIndexOf(" ");
lastIndexof = qMax(0, lastIndexof);
QString finalString = textValue.left(lastIndexof);
//Add a space if there's a word
if (finalString != "")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment