Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2fbad0e9
Commit
2fbad0e9
authored
Feb 14, 2008
by
Kurt B. Kaiser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assume that the user knows when he wants to end the line; don't insert
something he didn't select or complete. Backport r58306
parent
60d9f8df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
15 deletions
+4
-15
Lib/idlelib/AutoComplete.py
Lib/idlelib/AutoComplete.py
+1
-1
Lib/idlelib/AutoCompleteWindow.py
Lib/idlelib/AutoCompleteWindow.py
+3
-14
No files found.
Lib/idlelib/AutoComplete.py
View file @
2fbad0e9
...
...
@@ -27,7 +27,7 @@ class AutoComplete:
menudefs
=
[
(
'edit'
,
[
(
"Show
c
ompletions"
,
"<<force-open-completions>>"
),
(
"Show
C
ompletions"
,
"<<force-open-completions>>"
),
])
]
...
...
Lib/idlelib/AutoCompleteWindow.py
View file @
2fbad0e9
...
...
@@ -274,20 +274,9 @@ class AutoCompleteWindow:
self
.
_selection_changed
()
return
"break"
elif
keysym
==
"Return"
and
not
state
:
# If start is a prefix of the selection, or there was an indication
# that the user used the completion window, put the selected
# completion in the text, and close the list.
# Otherwise, close the window and let the event through.
cursel
=
int
(
self
.
listbox
.
curselection
()[
0
])
if
self
.
completions
[
cursel
][:
len
(
self
.
start
)]
==
self
.
start
or
\
self
.
userwantswindow
:
self
.
_change_start
(
self
.
completions
[
cursel
])
self
.
hide_window
()
return
"break"
else
:
self
.
hide_window
()
return
elif
keysym
==
"Return"
:
self
.
hide_window
()
return
elif
(
self
.
mode
==
AutoComplete
.
COMPLETE_ATTRIBUTES
and
keysym
in
(
"period"
,
"space"
,
"parenleft"
,
"parenright"
,
"bracketleft"
,
...
...
Write
Preview
Markdown
is supported
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