From 0945e203239f24faf44aec47eed8a1fd3eadc38e Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 20 Sep 2005 16:33:01 +0000 Subject: The PROMPT_SP code now ensures that PROMPT_PERCENT is enabled when it uses promptexpand() to expand some percent strings. (21739) --- Src/utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Src/utils.c b/Src/utils.c index acde33c28..8a7c557f0 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -758,7 +758,11 @@ preprompt(void) /* The PROMPT_SP heuristic will move the prompt down to a new line * if there was any dangling output on the line (assuming the terminal * has automatic margins, but we try even if hasam isn't set). */ - char *str = promptexpand("%B%S#%s%b", 0, NULL, NULL); + char *str; + int percents = isset(PROMPTPERCENT); + opts[PROMPTPERCENT] = 1; + str = promptexpand("%B%S#%s%b", 0, NULL, NULL); + opts[PROMPTPERCENT] = percents; fprintf(shout, "%s%*s\r", str, (int)columns - 1 - !hasxn, ""); free(str); } -- cgit 1.4.1