Permalink
Browse files

Fixes #2

This fix loops through each of the groups (i.e., split windows) and
determines whether or not to show the tabs based on the number of
views in each of the groups.
  • Loading branch information...
1 parent 6e435ba commit 0f29c0acb896fe737ae73e0fa3f486cbd2f45edc @croach committed Feb 11, 2013
Showing with 7 additions and 4 deletions.
  1. +7 −4 hide_tabs.py
View
@@ -62,10 +62,13 @@ def update_tabs_visibility(self):
if not window:
return
- num_of_views = len(window.views())
- if num_of_views > 1:
- self.tabs_visible = True
- elif num_of_views < 2:
+ # Loop through all of the groups (split windows), and if any have
+ # more than one view, show tabs, otherwise, hide them
+ for i in range(window.num_groups()):
+ if len(window.views_in_group(i)) > 1:
+ self.tabs_visible = True
+ break
+ else:
self.tabs_visible = False
def _get_tabs_visible(self):

0 comments on commit 0f29c0a

Please sign in to comment.