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
029a6a68
Commit
029a6a68
authored
May 21, 1999
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Much improved autoindent and handling of tabs,
by Tim Peters.
parent
c1bb6935
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
242 additions
and
65 deletions
+242
-65
Tools/idle/AutoIndent.py
Tools/idle/AutoIndent.py
+231
-58
Tools/idle/EditorWindow.py
Tools/idle/EditorWindow.py
+10
-6
Tools/idle/PyShell.py
Tools/idle/PyShell.py
+1
-1
No files found.
Tools/idle/AutoIndent.py
View file @
029a6a68
This diff is collapsed.
Click to expand it.
Tools/idle/EditorWindow.py
View file @
029a6a68
...
...
@@ -134,6 +134,7 @@ class EditorWindow:
text
[
'yscrollcommand'
]
=
vbar
.
set
if
sys
.
platform
[:
3
]
==
'win'
:
text
[
'font'
]
=
(
"lucida console"
,
8
)
# text['font'] = ("courier new", 10)
text
.
pack
(
side
=
LEFT
,
fill
=
BOTH
,
expand
=
1
)
text
.
focus_set
()
...
...
@@ -173,6 +174,10 @@ class EditorWindow:
self
.
wmenu_end
=
end
WindowList
.
register_callback
(
self
.
postwindowsmenu
)
if
self
.
extensions
.
has_key
(
'AutoIndent'
):
self
.
extensions
[
'AutoIndent'
].
set_indentation_params
(
self
.
ispythonsource
(
filename
))
def
wakeup
(
self
):
if
self
.
top
.
wm_state
()
==
"iconic"
:
self
.
top
.
wm_deiconify
()
...
...
@@ -575,7 +580,6 @@ class EditorWindow:
self
.
vars
[
name
]
=
var
=
vartype
(
self
.
text
)
return
var
def
prepstr
(
s
):
# Helper to extract the underscore from a string,
# e.g. prepstr("Co_py") returns (2, "Copy").
...
...
Tools/idle/PyShell.py
View file @
029a6a68
...
...
@@ -291,7 +291,7 @@ class PyShell(OutputWindow):
__builtin__
.
quit
=
__builtin__
.
exit
=
"To exit, type Ctrl-D."
self
.
auto
=
self
.
extensions
[
"AutoIndent"
]
# Required extension
self
.
auto
.
config
(
prefertabs
=
1
)
self
.
auto
.
config
(
usetabs
=
1
,
indentwidth
=
8
)
text
=
self
.
text
text
.
configure
(
wrap
=
"char"
)
...
...
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