summaryrefslogtreecommitdiffstats
path: root/Tools/idle
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-09-15 15:45:57 (GMT)
committerGuido van Rossum <guido@python.org>2000-09-15 15:45:57 (GMT)
commit3634112b40bac1086cff2019592beb27e28971c4 (patch)
tree56d94bdfae54e19b2486f727f218f6f155afd9be /Tools/idle
parent6e5184fe6a1d3f09416ee661fb59274d33ae8705 (diff)
downloadcpython-3634112b40bac1086cff2019592beb27e28971c4.zip
cpython-3634112b40bac1086cff2019592beb27e28971c4.tar.gz
cpython-3634112b40bac1086cff2019592beb27e28971c4.tar.bz2
Include the filename in the errror message for F5 without saving.
This closes bug #110660.
Diffstat (limited to 'Tools/idle')
-rw-r--r--Tools/idle/ScriptBinding.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tools/idle/ScriptBinding.py b/Tools/idle/ScriptBinding.py
index aa46c68..e46cb76 100644
--- a/Tools/idle/ScriptBinding.py
+++ b/Tools/idle/ScriptBinding.py
@@ -152,8 +152,12 @@ class ScriptBinding:
# Logic to make sure we have a saved filename
# XXX Better logic would offer to save!
if not self.editwin.get_saved():
+ name = (self.editwin.short_title() or
+ self.editwin.long_title() or
+ "Untitled")
self.errorbox("Not saved",
- "Please save first!")
+ "The buffer for %s is not saved.\n" % name +
+ "Please save it first!")
self.editwin.text.focus_set()
return
filename = self.editwin.io.filename