Skip to content

Commit

Permalink
Prevent an infinite loop when trimming title
Browse files Browse the repository at this point in the history
  • Loading branch information
kkris committed Jul 17, 2011
1 parent 8c7156e commit a3b062a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chronos/ui/month.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def draw_line(ctx, x1, y1, x2, y2):

title = event.title
t_width = get_text_extents(ctx, title)[2]
while t_width > space:
while t_width > space and len(title) > 1:
title = title[:-1]
t_width = get_text_extents(ctx, title)[2]

Expand Down

0 comments on commit a3b062a

Please sign in to comment.