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
0d28a61d
Commit
0d28a61d
authored
Apr 02, 2013
by
Roger Serwy
Browse files
Options
Browse Files
Download
Plain Diff
#17614: IDLE no longer raises exception when quickly closing a file.
parents
ed3a3035
d7c9d9cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
Lib/idlelib/PyShell.py
Lib/idlelib/PyShell.py
+5
-1
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/idlelib/PyShell.py
View file @
0d28a61d
...
@@ -111,12 +111,13 @@ class PyShellEditorWindow(EditorWindow):
...
@@ -111,12 +111,13 @@ class PyShellEditorWindow(EditorWindow):
self
.
breakpointPath
=
os
.
path
.
join
(
idleConf
.
GetUserCfgDir
(),
self
.
breakpointPath
=
os
.
path
.
join
(
idleConf
.
GetUserCfgDir
(),
'breakpoints.lst'
)
'breakpoints.lst'
)
# whenever a file is changed, restore breakpoints
# whenever a file is changed, restore breakpoints
if
self
.
io
.
filename
:
self
.
restore_file_breaks
()
def
filename_changed_hook
(
old_hook
=
self
.
io
.
filename_change_hook
,
def
filename_changed_hook
(
old_hook
=
self
.
io
.
filename_change_hook
,
self
=
self
):
self
=
self
):
self
.
restore_file_breaks
()
self
.
restore_file_breaks
()
old_hook
()
old_hook
()
self
.
io
.
set_filename_change_hook
(
filename_changed_hook
)
self
.
io
.
set_filename_change_hook
(
filename_changed_hook
)
if
self
.
io
.
filename
:
self
.
restore_file_breaks
()
rmenu_specs
=
[
rmenu_specs
=
[
(
"Cut"
,
"<<cut>>"
,
"rmenu_check_cut"
),
(
"Cut"
,
"<<cut>>"
,
"rmenu_check_cut"
),
...
@@ -233,6 +234,9 @@ class PyShellEditorWindow(EditorWindow):
...
@@ -233,6 +234,9 @@ class PyShellEditorWindow(EditorWindow):
def
restore_file_breaks
(
self
):
def
restore_file_breaks
(
self
):
self
.
text
.
update
()
# this enables setting "BREAK" tags to be visible
self
.
text
.
update
()
# this enables setting "BREAK" tags to be visible
if
self
.
io
is
None
:
# can happen if IDLE closes due to the .update() call
return
filename
=
self
.
io
.
filename
filename
=
self
.
io
.
filename
if
filename
is
None
:
if
filename
is
None
:
return
return
...
...
Misc/NEWS
View file @
0d28a61d
...
@@ -19,6 +19,8 @@ Core and Builtins
...
@@ -19,6 +19,8 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
17614
:
IDLE
no
longer
raises
exception
when
quickly
closing
a
file
.
-
Issue
#
6698
:
IDLE
now
opens
just
an
editor
window
when
configured
to
do
so
.
-
Issue
#
6698
:
IDLE
now
opens
just
an
editor
window
when
configured
to
do
so
.
-
Issue
#
8900
:
Using
keyboard
shortcuts
in
IDLE
to
open
a
file
no
longer
-
Issue
#
8900
:
Using
keyboard
shortcuts
in
IDLE
to
open
a
file
no
longer
...
...
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