mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05: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:
parent
6f8a3bd08d
commit
bc8ee2d26c
@ -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');
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user