summaryrefslogtreecommitdiffstats
path: root/Tools/idle/ScriptBinding.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/idle/ScriptBinding.py')
-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