- EditorWindow.test() was failing.  Bug 1417598

M    EditorWindow.py
M    ScriptBinding.py
M    NEWS.txt
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 397d12e..cb166cf 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -95,11 +95,12 @@
             self.tkinter_vars = flist.vars
             #self.top.instance_dict makes flist.inversedict avalable to
             #configDialog.py so it can access all EditorWindow instaces
-            self.top.instance_dict=flist.inversedict
+            self.top.instance_dict = flist.inversedict
         else:
             self.tkinter_vars = {}  # keys: Tkinter event names
                                     # values: Tkinter variable instances
-        self.recent_files_path=os.path.join(idleConf.GetUserCfgDir(),
+            self.top.instance_dict = {}
+        self.recent_files_path = os.path.join(idleConf.GetUserCfgDir(),
                 'recent-files.lst')
         self.vbar = vbar = Scrollbar(top, name='vbar')
         self.text_frame = text_frame = Frame(top)
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index ba624e5..e4b7ecd 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -3,6 +3,8 @@
 
 *Release date: XX-XXX-2006*
 
+- EditorWindow.test() was failing.  Bug 1417598
+
 - EditorWindow failed when used stand-alone if sys.ps1 not set.
   Bug 1010370 Dave Florek
 
diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py
index 084c607..878425d 100644
--- a/Lib/idlelib/ScriptBinding.py
+++ b/Lib/idlelib/ScriptBinding.py
@@ -51,7 +51,7 @@
         # Provide instance variables referenced by Debugger
         # XXX This should be done differently
         self.flist = self.editwin.flist
-        self.root = self.flist.root
+        self.root = self.editwin.root
 
     def check_module_event(self, event):
         filename = self.getfilename()