about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/ext/vcs/vcs.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/ranger/ext/vcs/vcs.py b/ranger/ext/vcs/vcs.py
index 2815916a..ca16fbbf 100644
--- a/ranger/ext/vcs/vcs.py
+++ b/ranger/ext/vcs/vcs.py
@@ -360,19 +360,18 @@ class VcsThread(threading.Thread):
         self.delay = idle_delay / 1000
         self.wake = threading.Event()
 
-    def _is_flat(self):
-        """Check for flat mode"""
+    def _check(self):
+        """Check for hinders"""
         for column in self.ui.browser.columns:
             if column.target and column.target.is_directory and column.target.flat:
                 return True
         return False
 
     def run(self):
-        # Set for already updated roots
-        roots = set()
+        roots = set() # already updated roots
         redraw = False
         while True:
-            if self._is_flat():
+            if self._check():
                 self.wake.wait(timeout=self.delay)
                 self.wake.clear()
                 continue
@@ -401,11 +400,12 @@ class VcsThread(threading.Thread):
                     if column.target and column.target.is_directory:
                         column.need_redraw = True
                 self.ui.status.need_redraw = True
-                self.ui.redraw()
+                if self.wake.is_set():
+                    self.ui.redraw()
 
             roots.clear()
-            self.wake.wait(timeout=self.delay)
             self.wake.clear()
+            self.wake.wait(timeout=self.delay)
 
     def wakeup(self):
         """Wakeup thread"""
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109