Commit 10abc64d authored by Lysander Trischler's avatar Lysander Trischler
Browse files

Allow nick foreground style to have further attributes

Previously, Urwid crashed when the foreground style with further
attributes was used as background color in the focus map.
parent 54ff87b7
......@@ -68,6 +68,7 @@ nick_colors = {
"lysetest": ("light magenta", "light green"),
"lysetestneu": ("light green", "light magenta"),
"xuu": "brown",
"lyse": "light green,bold",
}
palette = [
......@@ -99,8 +100,9 @@ for nick, color in nick_colors.items():
fg, bg = color
else:
fg, bg = color, "black"
fg_color, _, fg_attr = fg.partition(",")
palette.extend([("nick-%s-normal" % nick, fg, bg),
("nick-%s-focus" % nick, bg, fg)])
("nick-%s-focus" % nick, bg + (("," + fg_attr) if fg_attr else ""), fg_color)])
unread_focus_map["nick-%s-normal" % nick] = "nick-%s-focus" % nick
read_normal_map = {None: "read-normal"}
read_focus_map = dict(item for item in unread_focus_map.items())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment