mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-29 05:21:00 +01:00
25002: only ZLE should update attributes resulting from prompt expansion
This commit is contained in:
parent
58580d31f5
commit
bd70d684fc
11 changed files with 72 additions and 55 deletions
|
|
@ -1176,7 +1176,7 @@ preprompt(void)
|
|||
char *str;
|
||||
int percents = opts[PROMPTPERCENT];
|
||||
opts[PROMPTPERCENT] = 1;
|
||||
str = promptexpand("%B%S%#%s%b", 0, NULL, NULL);
|
||||
str = promptexpand("%B%S%#%s%b", 0, NULL, NULL, NULL);
|
||||
opts[PROMPTPERCENT] = percents;
|
||||
fprintf(shout, "%s%*s\r", str, (int)columns - 1 - !hasxn, "");
|
||||
free(str);
|
||||
|
|
@ -1341,7 +1341,8 @@ printprompt4(void)
|
|||
|
||||
opts[XTRACE] = 0;
|
||||
unmetafy(s, &l);
|
||||
s = unmetafy(promptexpand(metafy(s, l, META_NOALLOC), 0, NULL, NULL), &l);
|
||||
s = unmetafy(promptexpand(metafy(s, l, META_NOALLOC),
|
||||
0, NULL, NULL, NULL), &l);
|
||||
opts[XTRACE] = t;
|
||||
|
||||
fprintf(xtrerr, "%s", s);
|
||||
|
|
@ -2310,7 +2311,7 @@ spckword(char **s, int hist, int cmd, int ask)
|
|||
x = 'n';
|
||||
} else if (shout) {
|
||||
char *pptbuf;
|
||||
pptbuf = promptexpand(sprompt, 0, best, guess);
|
||||
pptbuf = promptexpand(sprompt, 0, best, guess, NULL);
|
||||
zputs(pptbuf, shout);
|
||||
free(pptbuf);
|
||||
fflush(shout);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue