Skip to content

Commit

Permalink
Prevent file-related menus to be visible for views with no file assoc…
Browse files Browse the repository at this point in the history
…iated
  • Loading branch information
mandx committed Aug 5, 2017
1 parent 7bf01c9 commit 53309d0
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 53309d0

Please sign in to comment.