1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-08 04:26:01 -04:00

Don't expand %{ and %} in themes to { and } - they could be treated as

abstracts again. Printing %{ and %} now prints just { and }. This fixes
printing {stuff} in statusbar (eg. {nick}).


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1885 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-10-21 17:56:42 +00:00 committed by cras
parent 6f8a3bd08d
commit bc8ee2d26c
2 changed files with 9 additions and 4 deletions

View File

@ -105,6 +105,12 @@ int format_expand_styles(GString *out, const char **format, int *flags)
fmt = **format;
switch (fmt) {
case '{':
case '}':
case '%':
/* escaped char */
g_string_append_c(out, fmt);
break;
case 'U':
/* Underline on/off */
g_string_append_c(out, 4);
@ -121,9 +127,6 @@ int format_expand_styles(GString *out, const char **format, int *flags)
g_string_append_c(out, 4);
g_string_append_c(out, FORMAT_STYLE_REVERSE);
break;
case '%':
g_string_append_c(out, '%');
break;
case ':':
/* Newline */
g_string_append_c(out, '\n');

View File

@ -212,7 +212,9 @@ static void theme_format_append_next(THEME_REC *theme, GString *str,
return;
}
/* %{ or %} gives us { or } char */
/* %{ or %} gives us { or } char - keep the % char
though to make sure {} isn't treated as abstract */
g_string_append_c(str, '%');
chr = **format;
}