1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

Bugfix: $alignr had some problems after commit 40452c9712

Example:
TEXT
alfa bravo
charlie ${alignr}delta
echo ${alignr}foxtrot

Note to self:
It could be that this fix brings back part of the bug that
40452c9712 fixed. Check this !
This commit is contained in:
Nikolas Garofil 2010-05-24 21:04:42 +02:00
parent fbd7ad0152
commit 4bc136be88
3 changed files with 6 additions and 1 deletions

View File

@ -788,6 +788,7 @@ void generate_text_internal(char *p, int p_max_size, struct text_object root)
#ifdef BUILD_ICONV #ifdef BUILD_ICONV
iconv_convert(&a, buff_in, p, p_max_size); iconv_convert(&a, buff_in, p, p_max_size);
#endif /* BUILD_ICONV */ #endif /* BUILD_ICONV */
if (!obj->verbatim_output)
substitute_newlines(p, a - 2); substitute_newlines(p, a - 2);
p += a; p += a;
p_max_size -= a; p_max_size -= a;

View File

@ -197,6 +197,7 @@ int ifblock_stack_empty(void **opaque)
void obj_be_plain_text(struct text_object *obj, const char *text) void obj_be_plain_text(struct text_object *obj, const char *text)
{ {
obj->data.s = strdup(text); obj->data.s = strdup(text);
obj->verbatim_output = 1;
memset(&obj->callbacks, 0, sizeof(obj->callbacks)); memset(&obj->callbacks, 0, sizeof(obj->callbacks));
obj->callbacks.print = &gen_print_obj_data_s; obj->callbacks.print = &gen_print_obj_data_s;

View File

@ -85,6 +85,9 @@ struct text_object {
long l; /* some long integer */ long l; /* some long integer */
} data; } data;
/* if non-zero, no substitute_newlines() is applied to object's output */
char verbatim_output;
void *special_data; void *special_data;
long line; long line;
struct obj_cb callbacks; struct obj_cb callbacks;