/SET prompt - if target had %c or something in it, it shouldn't be

treated as color code. So color codes can now be used in /SET prompt
string itself, but in none of the $variables it uses.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1324 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-03-03 21:34:06 +00:00 committed by cras
commit d4558de232
3 changed files with 17 additions and 2 deletions

View file

@ -693,7 +693,8 @@ void window_update_prompt(void)
prompt = parse_special_string(special, active_win->active_server,
active_win->active, "", &var_used,
PARSE_FLAG_ISSET_ANY);
PARSE_FLAG_ISSET_ANY |
PARSE_FLAG_ESCAPE_VARS);
if (!var_used && strchr(special, '$') != NULL) {
/* none of the $vars had non-empty values, use empty prompt */
*prompt = '\0';