summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-05-10 23:28:44 +0200
committerhut <hut@lavabit.com>2012-05-10 23:28:44 +0200
commit10a0fb465c27fbb41249ee763aa2fc8fe98adbb5 (patch)
tree57dc9cc2373329ff36984dbafb2ee4afbf8ea431
parent5417dda5fcb4950cb8979e311ae29d285615a633 (diff)
downloadranger-10a0fb465c27fbb41249ee763aa2fc8fe98adbb5.tar.gz
widgets.browsercolumn: update infostring when changed
-rw-r--r--ranger/gui/widgets/browsercolumn.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index eed19a86..8af7157a 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -3,8 +3,8 @@
 # This software is distributed under the terms of the GNU GPL version 3.
 
 """The BrowserColumn widget displays the contents of a directory or file."""
-import stat
 import curses
+import stat
 from time import time
 
 from . import Widget
@@ -86,9 +86,19 @@ class BrowserColumn(Pager):
 
 		return True
 
-	def execute_curses_batch(self, line, data):
+	def execute_curses_batch(self, line, commands):
+		"""
+		Executes a list of "commands" which can be easily cached.
+
+		"commands" is a list of lists.  Each element contains
+		a text and an attribute.  First, the attribute will be
+		set with attrset, then the text is printed.
+
+		Example:
+		execute_curses_batch(0, [["hello ", 0], ["world", curses.A_BOLD]])
+		"""
 		self.win.move(line, 0)
-		for entry in data:
+		for entry in commands:
 			text, attr = entry
 			self.win.attrset(attr)
 			try:
@@ -219,7 +229,8 @@ class BrowserColumn(Pager):
 			else:
 				tagged_marker = " "
 
-			key = (self.wid, selected_i == i, drawn.marked, drawn.path in copied, tagged_marker)
+			key = (self.wid, selected_i == i, drawn.marked,
+					drawn.path in copied, tagged_marker, drawn.infostring)
 
 			if key in drawn.display_data:
 				self.execute_curses_batch(line, drawn.display_data[key])