From 3634112b40bac1086cff2019592beb27e28971c4 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 15 Sep 2000 15:45:57 +0000 Subject: Include the filename in the errror message for F5 without saving. This closes bug #110660. --- Tools/idle/ScriptBinding.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v0.12