Skip to content

Commit

Permalink
Merge aef40b2 into f4c97be
Browse files Browse the repository at this point in the history
  • Loading branch information
kaste committed Jan 16, 2019
2 parents f4c97be + aef40b2 commit 4ef621d
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions core/commands/status_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,29 @@ def on_post_save(self, view):
update_status_bar_soon = False


def view_is_transient(view):
window = view.window()
if not window:
return True

group, index = window.get_view_index(view)
if index == -1: # input panels, aka 'widgets'
return True

if window.transient_view_in_group(window.active_group()) == view:
return True

return False


class GsUpdateStatusBarCommand(TextCommand, GitCommand):

"""
Update the short Git status in the Sublime status bar.
"""

def run(self, edit):

window = self.view.window()
if not window or \
(self.view.file_name() and
self.view == window.transient_view_in_group(window.active_group())):
# it means it is an transient view of a regular file
if view_is_transient(self.view):
return

global last_execution, update_status_bar_soon
Expand Down

0 comments on commit 4ef621d

Please sign in to comment.