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
1bf4c2d2
Commit
1bf4c2d2
authored
Jul 21, 2002
by
Kurt B. Kaiser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug: clearing the shell undo list after a prompt was allowing files to be
opened on top of the shell instead of in a new window.
parent
d69030db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
Lib/idlelib/IOBinding.py
Lib/idlelib/IOBinding.py
+11
-5
No files found.
Lib/idlelib/IOBinding.py
View file @
1bf4c2d2
...
@@ -87,17 +87,23 @@ class IOBinding:
...
@@ -87,17 +87,23 @@ class IOBinding:
else
:
else
:
filename
=
editFile
filename
=
editFile
if
filename
:
if
filename
:
# if the current window has no filename and hasn't been
# If the current window has no filename and hasn't been
# modified, we replace it's contents (no loss). Otherwise
# modified, we replace its contents (no loss). Otherwise
# we open a new window.
# we open a new window. But we won't replace the
if
not
self
.
filename
and
self
.
get_saved
():
# shell window (which has an interp(reter) attribute), which
# gets set to "not modified" at every new prompt.
try
:
interp
=
self
.
editwin
.
interp
except
:
interp
=
None
if
not
self
.
filename
and
self
.
get_saved
()
and
not
interp
:
self
.
editwin
.
flist
.
open
(
filename
,
self
.
loadfile
)
self
.
editwin
.
flist
.
open
(
filename
,
self
.
loadfile
)
else
:
else
:
self
.
editwin
.
flist
.
open
(
filename
)
self
.
editwin
.
flist
.
open
(
filename
)
else
:
else
:
self
.
text
.
focus_set
()
self
.
text
.
focus_set
()
return
"break"
return
"break"
#
# Code for use outside IDLE:
# Code for use outside IDLE:
if
self
.
get_saved
():
if
self
.
get_saved
():
reply
=
self
.
maybesave
()
reply
=
self
.
maybesave
()
...
...
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