mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 23:22:16 +02:00
/EVAL will now expand \n and \t to newline and tab.
If you /SET expand_escapes ON and type \n or \t to text line, they will be expanded. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@326 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
b8e1bb0444
commit
919abb2c6f
3 changed files with 70 additions and 3 deletions
|
|
@ -414,7 +414,16 @@ char *parse_special_string(const char *cmd, void *server, void *item, const char
|
|||
str = g_string_new(NULL);
|
||||
while (*cmd != '\0') {
|
||||
if (code == '\\'){
|
||||
g_string_append_c(str, *cmd);
|
||||
switch (*cmd) {
|
||||
case 't':
|
||||
g_string_append_c(str, '\t');
|
||||
break;
|
||||
case 'n':
|
||||
g_string_append_c(str, '\n');
|
||||
break;
|
||||
default:
|
||||
g_string_append_c(str, *cmd);
|
||||
}
|
||||
code = 0;
|
||||
} else if (code == '$') {
|
||||
char *ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue