diff options
Diffstat (limited to 'Src/utils.c')
-rw-r--r-- | Src/utils.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |