diff options
Diffstat (limited to 'Lib/idlelib/FileList.py')
-rw-r--r-- | Lib/idlelib/FileList.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/idlelib/FileList.py b/Lib/idlelib/FileList.py index 52b3eeb..2f5053f 100644 --- a/Lib/idlelib/FileList.py +++ b/Lib/idlelib/FileList.py @@ -33,7 +33,12 @@ class FileList: # Don't create window, perform 'action', e.g. open in same window return action(filename) else: - return self.EditorWindow(self, filename, key) + edit = self.EditorWindow(self, filename, key) + if edit.good_load: + return edit + else: + edit._close() + return None def gotofileline(self, filename, lineno=None): edit = self.open(filename) |