Skip to content

Commit

Permalink
Merge pull request #9 from mandx/fix/handle-untargeted-views
Browse files Browse the repository at this point in the history
Prevent file-related menus to be visible for views with no file associated
  • Loading branch information
braver committed Aug 6, 2017
2 parents 7bf01c9 + 53309d0 commit 1b795ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SideBar.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def get_path(self, paths):
return self.window.active_view().file_name()

def is_visible(self, paths):
return len(paths) < 2
if paths:
return len(paths) < 2
return bool(self.window.active_view().file_name())

@staticmethod
def make_dirs_for(filename):
Expand Down

0 comments on commit 1b795ff

Please sign in to comment.