Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
082d7e86
Commit
082d7e86
authored
Oct 15, 2014
by
Maxime Perrotin
Browse files
Autocompletion fix when using F8
parent
d739c5c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
TextInteraction.py
View file @
082d7e86
...
...
@@ -238,8 +238,10 @@ class EditableText(QGraphicsTextItem, object):
text_cursor
.
setPosition
(
self
.
cursor_position
)
extra
=
len
(
item
.
text
())
-
len
(
self
.
completion_prefix
)
if
extra
>
0
:
text_cursor
.
movePosition
(
QTextCursor
.
Left
)
text_cursor
.
movePosition
(
QTextCursor
.
EndOfWord
)
if
len
(
self
.
completion_prefix
):
# Move back left only if there is a word to replace
text_cursor
.
movePosition
(
QTextCursor
.
Left
)
text_cursor
.
movePosition
(
QTextCursor
.
EndOfWord
)
text_cursor
.
insertText
(
item
.
text
()[
-
extra
:])
self
.
setTextCursor
(
text_cursor
)
self
.
completer_has_focus
=
False
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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