1. Fail gracefully if the file fails to decode when loaded.

2. If the load fails, close the half-built edit window.
3. Don't reopen the file to check the shebang.
4. Clarify that we're setting tabs in Tk.

M    EditorWindow.py
M    FileList.py
This commit is contained in:
Kurt B. Kaiser 2007-09-06 04:03:04 +00:00
parent 3da4c4bcab
commit 105f60ee62
2 changed files with 31 additions and 44 deletions

View file

@ -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)