mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-29 05:21:00 +01:00
The PROMPT_SP code now ensures that PROMPT_PERCENT is enabled when
it uses promptexpand() to expand some percent strings. (21739)
This commit is contained in:
parent
29bb2438c0
commit
0945e20323
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue