1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 16:50:58 +01:00

24007: prompt allocation and use of "shout"

This commit is contained in:
Peter Stephenson 2007-10-22 10:22:16 +00:00
parent 756cfc08e2
commit 6567e77a4e
3 changed files with 9 additions and 5 deletions

View file

@ -1160,7 +1160,7 @@ preprompt(void)
int period = getiparam("PERIOD");
int mailcheck = getiparam("MAILCHECK");
if (isset(PROMPTSP) && isset(PROMPTCR) && !use_exit_printed) {
if (isset(PROMPTSP) && isset(PROMPTCR) && !use_exit_printed && shout) {
/* 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).
@ -1284,7 +1284,7 @@ checkmailpath(char **s)
checkmailpath(arr);
popheap();
}
} else {
} else if (shout) {
if (st.st_size && st.st_atime <= st.st_mtime &&
st.st_mtime > lastmailcheck) {
if (!u) {
@ -2302,7 +2302,7 @@ spckword(char **s, int hist, int cmd, int ask)
if (ask) {
if (noquery(0)) {
x = 'n';
} else {
} else if (shout) {
char *pptbuf;
pptbuf = promptexpand(sprompt, 0, best, guess);
zputs(pptbuf, shout);