mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
3da4c4bcab
commit
105f60ee62
2 changed files with 31 additions and 44 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue