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
5ec186b1
Commit
5ec186b1
authored
Jan 17, 2003
by
Kurt B. Kaiser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch 611069 (Christos Georgiou) IDLE TODO:left/right when selected text
M EditorWindow.py M NEWS.txt M TODO.txt
parent
9fd0799f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
Lib/idlelib/EditorWindow.py
Lib/idlelib/EditorWindow.py
+22
-0
Lib/idlelib/NEWS.txt
Lib/idlelib/NEWS.txt
+6
-0
Lib/idlelib/TODO.txt
Lib/idlelib/TODO.txt
+0
-2
No files found.
Lib/idlelib/EditorWindow.py
View file @
5ec186b1
...
@@ -132,6 +132,8 @@ class EditorWindow:
...
@@ -132,6 +132,8 @@ class EditorWindow:
text
.
bind
(
"<<untabify-region>>"
,
self
.
untabify_region_event
)
text
.
bind
(
"<<untabify-region>>"
,
self
.
untabify_region_event
)
text
.
bind
(
"<<toggle-tabs>>"
,
self
.
toggle_tabs_event
)
text
.
bind
(
"<<toggle-tabs>>"
,
self
.
toggle_tabs_event
)
text
.
bind
(
"<<change-indentwidth>>"
,
self
.
change_indentwidth_event
)
text
.
bind
(
"<<change-indentwidth>>"
,
self
.
change_indentwidth_event
)
text
.
bind
(
"<Left>"
,
self
.
move_at_edge_if_selection
(
0
))
text
.
bind
(
"<Right>"
,
self
.
move_at_edge_if_selection
(
1
))
if
flist
:
if
flist
:
flist
.
inversedict
[
self
]
=
key
flist
.
inversedict
[
self
]
=
key
...
@@ -344,6 +346,26 @@ class EditorWindow:
...
@@ -344,6 +346,26 @@ class EditorWindow:
self
.
text
.
tag_remove
(
"sel"
,
"1.0"
,
"end"
)
self
.
text
.
tag_remove
(
"sel"
,
"1.0"
,
"end"
)
self
.
text
.
see
(
"insert"
)
self
.
text
.
see
(
"insert"
)
def
move_at_edge_if_selection
(
self
,
edge_index
):
"""Cursor move begins at start or end of selection
When a left/right cursor key is pressed create and return to Tkinter a
function which causes a cursor move from the associated edge of the
selection.
"""
self_text_index
=
self
.
text
.
index
self_text_mark_set
=
self
.
text
.
mark_set
edges_table
=
(
"sel.first+1c"
,
"sel.last-1c"
)
def
move_at_edge
(
event
):
if
(
event
.
state
&
5
)
==
0
:
# no shift(==1) or control(==4) pressed
try
:
self_text_index
(
"sel.first"
)
self_text_mark_set
(
"insert"
,
edges_table
[
edge_index
])
except
TclError
:
pass
return
move_at_edge
def
find_event
(
self
,
event
):
def
find_event
(
self
,
event
):
SearchDialog
.
find
(
self
.
text
)
SearchDialog
.
find
(
self
.
text
)
return
"break"
return
"break"
...
...
Lib/idlelib/NEWS.txt
View file @
5ec186b1
...
@@ -7,6 +7,12 @@ What's New in IDLEfork 0.9 Alpha 2?
...
@@ -7,6 +7,12 @@ What's New in IDLEfork 0.9 Alpha 2?
*Release date: XX-XXX-2003*
*Release date: XX-XXX-2003*
- Left cursor move in presence of selected text now moves from left end
of the selection.
- Add Meta keybindings to "IDLE Classic Windows" to handle reversed
Alt/Meta on some Linux distros.
- Change default: IDLE now starts with Python Shell.
- Change default: IDLE now starts with Python Shell.
- Removed the File Path from the Additional Help Sources scrolled list.
- Removed the File Path from the Additional Help Sources scrolled list.
...
...
Lib/idlelib/TODO.txt
View file @
5ec186b1
...
@@ -46,8 +46,6 @@ TO DO:
...
@@ -46,8 +46,6 @@ TO DO:
Details:
Details:
- when there's a selection, left/right arrow should go to either
end of the selection
- ^O (on Unix -- open-line) should honor autoindent
- ^O (on Unix -- open-line) should honor autoindent
- after paste, show end of pasted text
- after paste, show end of pasted text
- on Windows, should turn short filename to long filename (not only in argv!)
- on Windows, should turn short filename to long filename (not only in argv!)
...
...
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