Skip to content

Commit

Permalink
Merge pull request #147 from SublimeText/view_window
Browse files Browse the repository at this point in the history
check if view.window() is not None
  • Loading branch information
adzenith committed Feb 21, 2019
2 parents 06fd3ae + d3b4c49 commit 5f3042d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions origami.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def carry_file_to_pane(self, direction, create_new_if_necessary=False):
views_in_group = window.views_in_group(active_group)
window.set_view_index(view, active_group, len(views_in_group))
sublime.set_timeout(lambda: window.focus_view(view))


def clone_file_to_pane(self, direction, create_new_if_necessary=False):
window = self.window
Expand Down Expand Up @@ -753,7 +753,7 @@ def is_tabless_view(self, view):
If we think it's this kind of view, return True."""
if sublime.version()[0] == '2':
return False
elif view.window().get_view_index(view)[1] == -1:
elif view.window() and view.window().get_view_index(view)[1] == -1:
return True
return False

Expand Down

0 comments on commit 5f3042d

Please sign in to comment.