Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
50e0b6dd
Commit
50e0b6dd
authored
Aug 20, 2015
by
Jeff
Browse files
Merge lines
parent
97d0cfa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/lineeditcompleter.cpp
View file @
50e0b6dd
...
...
@@ -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
!=
""
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment