summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/color.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ranger/gui/color.py b/ranger/gui/color.py
index 265f8b5b..2dcf948d 100644
--- a/ranger/gui/color.py
+++ b/ranger/gui/color.py
@@ -60,3 +60,9 @@ underline  = curses.A_UNDERLINE
 invisible  = curses.A_INVIS
 
 default_colors = (default, default, normal)
+
+def remove_attr(integer, attr):
+	"""Remove an attribute from an integer"""
+	if integer & attribute:
+		return integer ^ attribute
+	return integer