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
862d13a3
Commit
862d13a3
authored
Jun 03, 2012
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #14937: Perform auto-completion of filenames in strings even for non-ASCII filenames.
parent
e606e238
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
Lib/idlelib/AutoComplete.py
Lib/idlelib/AutoComplete.py
+9
-2
Lib/idlelib/AutoCompleteWindow.py
Lib/idlelib/AutoCompleteWindow.py
+9
-0
Lib/idlelib/NEWS.txt
Lib/idlelib/NEWS.txt
+6
-0
No files found.
Lib/idlelib/AutoComplete.py
View file @
862d13a3
...
...
@@ -124,13 +124,20 @@ class AutoComplete:
curline
=
self
.
text
.
get
(
"insert linestart"
,
"insert"
)
i
=
j
=
len
(
curline
)
if
hp
.
is_in_string
()
and
(
not
mode
or
mode
==
COMPLETE_FILES
):
# Find the beginning of the string
# fetch_completions will look at the file system to determine whether the
# string value constitutes an actual file name
# XXX could consider raw strings here and unescape the string value if it's
# not raw.
self
.
_remove_autocomplete_window
()
mode
=
COMPLETE_FILES
while
i
and
curline
[
i
-
1
]
in
FILENAME_CHARS
:
# Find last separator or string start
while
i
and
curline
[
i
-
1
]
not
in
"'
\
"
"
+
SEPS
:
i
-=
1
comp_start
=
curline
[
i
:
j
]
j
=
i
while
i
and
curline
[
i
-
1
]
in
FILENAME_CHARS
+
SEPS
:
# Find string start
while
i
and
curline
[
i
-
1
]
not
in
"'
\
"
"
:
i
-=
1
comp_what
=
curline
[
i
:
j
]
elif
hp
.
is_in_code
()
and
(
not
mode
or
mode
==
COMPLETE_ATTRIBUTES
):
...
...
Lib/idlelib/AutoCompleteWindow.py
View file @
862d13a3
...
...
@@ -354,6 +354,15 @@ class AutoCompleteWindow:
# A modifier key, so ignore
return
elif
event
.
char
:
# Regular character with a non-length-1 keycode
self
.
_change_start
(
self
.
start
+
event
.
char
)
self
.
lasttypedstart
=
self
.
start
self
.
listbox
.
select_clear
(
0
,
int
(
self
.
listbox
.
curselection
()[
0
]))
self
.
listbox
.
select_set
(
self
.
_binary_search
(
self
.
start
))
self
.
_selection_changed
()
return
"break"
else
:
# Unknown event, close the window and let it through.
self
.
hide_window
()
...
...
Lib/idlelib/NEWS.txt
View file @
862d13a3
What's New in IDLE 3.2.4?
=========================
- Issue #14937: Perform auto-completion of filenames in strings even for
non-ASCII filenames.
What's New in IDLE 3.2.3?
=========================
...
...
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