]> granicus.if.org Git - python/commitdiff
Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu.
authorNed Deily <nad@acm.org>
Tue, 29 May 2012 17:42:34 +0000 (10:42 -0700)
committerNed Deily <nad@acm.org>
Tue, 29 May 2012 17:42:34 +0000 (10:42 -0700)
Lib/idlelib/EditorWindow.py
Misc/NEWS

index fb05245dc312d62cf992b85c4538bf7a4b1f79dc..68b51e6868341d71860b6169f0289f49c9c3aa23 100644 (file)
@@ -856,7 +856,7 @@ class EditorWindow(object):
         # for each edit window instance, construct the recent files menu
         for instance in self.top.instance_dict.keys():
             menu = instance.recent_files_menu
-            menu.delete(1, END)  # clear, and rebuild:
+            menu.delete(0, END)  # clear, and rebuild:
             for i, file_name in enumerate(rf_list):
                 file_name = file_name.rstrip()  # zap \n
                 # make unicode string to display non-ASCII chars correctly
index efcf5501190c3891988ec3a6e900f14096993377..2c50c2f6ba851903e9fe0caff374c8b6594119f4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -67,6 +67,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu.
+
 - Issue12510: Attempting to get invalid tooltip no longer closes Idle.
   Original patch by Roger Serwy.