From 1f1b846a2d22e1eb809bba8e29a8c646f11370fa Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Sat, 18 Jul 2009 14:25:57 -0600 Subject: [PATCH] Specials can be within multi-line objects. --- src/conky.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/conky.c b/src/conky.c index 22300d00..6291772a 100644 --- a/src/conky.c +++ b/src/conky.c @@ -6448,13 +6448,14 @@ static void draw_string(const char *s) } #ifdef X11 -int draw_each_line_inner(char *s, int special_index, const int last_special_applied) +int draw_each_line_inner(char *s, int special_index, int last_special_applied) { int font_h = font_height(); int cur_y_add = 0; char *recurse = 0; char *p = s; int last_special_needed = -1; + int orig_special_index = special_index; cur_x = text_start_x; cur_y += font_ascent(); @@ -6866,7 +6867,12 @@ int draw_each_line_inner(char *s, int special_index, const int last_special_appl cur_x += w; - if (special_index != last_special_applied) special_index++; + if (special_index != last_special_applied) { + special_index++; + } else { + special_index = orig_special_index; + last_special_applied = -1; + } } p++; }