mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Fix first word completion
This commit is contained in:
parent
05f2bc8392
commit
97d0cfa3d9
1 changed files with 1 additions and 0 deletions
|
|
@ -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 != "")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue