]> granicus.if.org Git - python/commitdiff
Include the filename in the errror message for F5 without saving.
authorGuido van Rossum <guido@python.org>
Fri, 15 Sep 2000 15:45:57 +0000 (15:45 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 15 Sep 2000 15:45:57 +0000 (15:45 +0000)
This closes bug #110660.

Tools/idle/ScriptBinding.py

index aa46c680b8a7ca309f300bf875342741cfecfaca..e46cb76274aa1ee052095c437c4ce37004ff8396 100644 (file)
@@ -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