[gedit-plugins] git: Ignore closed files that are not in the file browser



commit c445898a48566a4ec480df067912e8ac50c61c47
Author: Garrett Regier <garrettregier gmail com>
Date:   Sat Feb 14 17:38:01 2015 -0800

    git: Ignore closed files that are not in the file browser
    
    We only need to update the git status if the
    file is in the file browser.

 plugins/git/git/windowactivatable.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/git/git/windowactivatable.py b/plugins/git/git/windowactivatable.py
index b200cbf..1eb0077 100644
--- a/plugins/git/git/windowactivatable.py
+++ b/plugins/git/git/windowactivatable.py
@@ -239,6 +239,9 @@ class GitWindowActivatable(GObject.Object, Gedit.WindowActivatable):
         if location is None:
             return
 
+        if location not in self.file_nodes:
+            return
+
         repo = self.get_repository(location)
         if repo is not None:
             self.git_status_thread.push(repo, location)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]