Skip to content

Commit

Permalink
deal with short urwid color attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
geier committed Oct 26, 2023
1 parent 966157d commit cdffeb4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions khal/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1304,8 +1304,12 @@ def _add_calendar_colors(
bg_color, fg_color = '', ''
for attr in palette:
if base and attr[0] == base:
bg_color = attr[5]
fg_color = attr[4]
if color_mode == 'rgb' and len(attr) >= 5:
bg_color = attr[5]
fg_color = attr[4]
else:
bg_color = attr[2]
fg_color = attr[1]

for cal in collection.calendars:
if cal['color'] == '':
Expand Down

0 comments on commit cdffeb4

Please sign in to comment.