1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-30 05:59:07 +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,7 +788,8 @@ void generate_text_internal(char *p, int p_max_size, struct text_object root)
#ifdef BUILD_ICONV
iconv_convert(&a, buff_in, p, p_max_size);
#endif /* BUILD_ICONV */
substitute_newlines(p, a - 2);
if (!obj->verbatim_output)
substitute_newlines(p, a - 2);
p += a;
p_max_size -= a;
(*p) = 0;

View File

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

View File

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