summary refs log tree commit diff stats
path: root/ranger/gui/widgets/browsercolumn.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/gui/widgets/browsercolumn.py')
-rw-r--r--ranger/gui/widgets/browsercolumn.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index b8277748..801b79fd 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -27,7 +27,6 @@ class BrowserColumn(Pager):
 	display_infostring = False
 	scroll_begin = 0
 	target = None
-	tagged_marker = '*'
 	last_redraw_time = -1
 	ellipsis = { False: '~', True: '…' }
 
@@ -228,9 +227,14 @@ class BrowserColumn(Pager):
 			text = drawn.basename
 			tagged = self.fm.tags and drawn.realpath in self.fm.tags
 
+			if tagged:
+				tagged_marker = self.fm.tags.marker(drawn.realpath)
+
 			space = self.wid - len(infostring)
 			if self.main_column:
 				space -= 2
+			elif self.settings.display_tags_in_all_columns:
+				space -= 1
 
 #			if len(text) > space:
 #				text = text[:space-1] + self.ellipsis
@@ -240,13 +244,13 @@ class BrowserColumn(Pager):
 
 			if drawn.marked:
 				this_color.append('marked')
-				if self.main_column:
+				if self.main_column or self.settings.display_tags_in_all_columns:
 					text = " " + text
 
 			if tagged:
 				this_color.append('tagged')
-				if self.main_column:
-					text = self.tagged_marker + text
+				if self.main_column or self.settings.display_tags_in_all_columns:
+					text = tagged_marker + text
 
 			if drawn.is_directory:
 				this_color.append('directory')
@@ -276,7 +280,7 @@ class BrowserColumn(Pager):
 			wtext = WideString(text)
 			if len(wtext) > space:
 				wtext = wtext[:space - 1] + ellipsis
-			if self.main_column:
+			if self.main_column or self.settings.display_tags_in_all_columns:
 				if tagged:
 					self.addstr(line, 0, str(wtext))
 				elif self.wid > 1:
@@ -296,9 +300,10 @@ class BrowserColumn(Pager):
 				start, wid = bad_info_color
 				self.color_at(line, start, wid, this_color, 'badinfo')
 
-			if self.main_column and tagged and self.wid > 2:
+			if (self.main_column or self.settings.display_tags_in_all_columns) \
+					and tagged and self.wid > 2:
 				this_color.append('tag_marker')
-				self.color_at(line, 0, len(self.tagged_marker), this_color)
+				self.color_at(line, 0, len(tagged_marker), this_color)
 
 			self.color_reset()