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
946f1721
Commit
946f1721
authored
Mar 25, 2011
by
Kurt B. Kaiser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
<Home> toggle failing on Tk 8.5, causing IDLE exits. Issue #4676
parent
b9a428d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
Lib/idlelib/EditorWindow.py
Lib/idlelib/EditorWindow.py
+9
-12
Lib/idlelib/NEWS.txt
Lib/idlelib/NEWS.txt
+4
-1
No files found.
Lib/idlelib/EditorWindow.py
View file @
946f1721
...
...
@@ -307,10 +307,10 @@ class EditorWindow(object):
if
(
event
.
state
&
4
)
!=
0
and
event
.
keysym
==
"Home"
:
# state&4==Control. If <Control-Home>, use the Tk binding.
return
if
self
.
text
.
index
(
"iomark"
)
and
\
self
.
text
.
compare
(
"iomark"
,
"<="
,
"insert lineend"
)
and
\
self
.
text
.
compare
(
"insert linestart"
,
"<="
,
"iomark"
):
# In Shell on input line, go to just after prompt
insertpt
=
int
(
self
.
text
.
index
(
"iomark"
).
split
(
"."
)[
1
])
else
:
line
=
self
.
text
.
get
(
"insert linestart"
,
"insert lineend"
)
...
...
@@ -319,30 +319,27 @@ class EditorWindow(object):
break
else
:
insertpt
=
len
(
line
)
lineat
=
int
(
self
.
text
.
index
(
"insert"
).
split
(
'.'
)[
1
])
if
insertpt
==
lineat
:
insertpt
=
0
dest
=
"insert linestart+"
+
str
(
insertpt
)
+
"c"
if
(
event
.
state
&
1
)
==
0
:
# shift not pressed
# shift
was
not pressed
self
.
text
.
tag_remove
(
"sel"
,
"1.0"
,
"end"
)
else
:
if
not
self
.
text
.
index
(
"sel.first"
):
self
.
text
.
mark_set
(
"anchor"
,
"insert"
)
self
.
text
.
mark_set
(
"my_anchor"
,
"insert"
)
# there was no previous selection
else
:
if
self
.
text
.
compare
(
self
.
text
.
index
(
"sel.first"
),
"<"
,
self
.
text
.
index
(
"insert"
)):
self
.
text
.
mark_set
(
"my_anchor"
,
"sel.first"
)
# extend back
else
:
self
.
text
.
mark_set
(
"my_anchor"
,
"sel.last"
)
# extend forward
first
=
self
.
text
.
index
(
dest
)
last
=
self
.
text
.
index
(
"anchor"
)
last
=
self
.
text
.
index
(
"my_anchor"
)
if
self
.
text
.
compare
(
first
,
">"
,
last
):
first
,
last
=
last
,
first
self
.
text
.
tag_remove
(
"sel"
,
"1.0"
,
"end"
)
self
.
text
.
tag_add
(
"sel"
,
first
,
last
)
self
.
text
.
mark_set
(
"insert"
,
dest
)
self
.
text
.
see
(
"insert"
)
return
"break"
...
...
Lib/idlelib/NEWS.txt
View file @
946f1721
...
...
@@ -3,7 +3,10 @@ What's New in IDLE 3.1.4?
*Release date: XX-XXX-XX*
- <Home> toggle non-functional when NumLock set on Windows. Issue3851.
- <Home> toggle failing on Tk 8.5, causing IDLE exits and strange selection
behavior. Issue 4676. Improve selection extension behaviour.
- <Home> toggle non-functional when NumLock set on Windows. Issue 3851.
What's New in IDLE 3.1b1?
...
...
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