From 50e0b6dd35ab596eb9ca1da4cd75bb6e11ed3b17 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 20 Aug 2015 23:33:06 -0400 Subject: [PATCH] Merge lines --- cockatrice/src/lineeditcompleter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cockatrice/src/lineeditcompleter.cpp b/cockatrice/src/lineeditcompleter.cpp index 380518c8..6860295d 100644 --- a/cockatrice/src/lineeditcompleter.cpp +++ b/cockatrice/src/lineeditcompleter.cpp @@ -45,8 +45,7 @@ void LineEditCompleter::keyPressEvent(QKeyEvent * event) c->popup()->hide(); //Truncate the line to last space or whole string QString textValue = text(); - int lastIndexof = textValue.lastIndexOf(" "); - lastIndexof = qMax(0, lastIndexof); + int lastIndexof = qMax(0, textValue.lastIndexOf(" ")); QString finalString = textValue.left(lastIndexof); //Add a space if there's a word if (finalString != "")