Skip to content

Commit

Permalink
slight bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
hughperkins committed Aug 5, 2016
1 parent 894030c commit b567263
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions closeondelete.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ def on_activated(self, view):
if view.is_dirty():
return
filename = view.file_name()
if not os.path.exists(filename):
if filename is not None and not os.path.exists(filename):
view.set_scratch(True)
sublime.set_timeout(lambda: view.window().run_command("close_file"), 0)

3 comments on commit b567263

@bhack
Copy link

@bhack bhack commented on b567263 Aug 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this implementing this Atom feature atom/tabs#160?

@hughperkins
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Except this is sublime, and that is atom.

@hughperkins
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well... no... it's implementing if the file was deleted outside of sublime, and then you click on the tab, the tab will close

Please sign in to comment.