diff options
author | hut <hut@lavabit.com> | 2010-01-21 04:36:53 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-01-21 04:39:52 +0100 |
commit | c8f40bb1693ea8fbb4923c547e7c0a5f89fa0282 (patch) | |
tree | 8dfd4f577a45859fcb3ab8b5a99f4f64943152f6 /ranger | |
parent | 2906aa446a27e2bae93436cf8ae0ab4da86e3dd3 (diff) | |
download | ranger-c8f40bb1693ea8fbb4923c547e7c0a5f89fa0282.tar.gz |
color: added a remove_attr function
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/gui/color.py | 6 |
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 |