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

23409: disable prompt_sp output after ^D was seen and message printed

This commit is contained in:
Andrey Borzenkov 2007-05-10 11:36:22 +00:00
parent 7d700220cf
commit ac1c483496
3 changed files with 13 additions and 3 deletions

View file

@ -1156,10 +1156,13 @@ preprompt(void)
int period = getiparam("PERIOD");
int mailcheck = getiparam("MAILCHECK");
if (isset(PROMPTSP) && isset(PROMPTCR)) {
if (isset(PROMPTSP) && isset(PROMPTCR) && !use_exit_printed) {
/* 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). */
* has automatic margins, but we try even if hasam isn't set).
* Unfortunately it interacts badly with ZLE displaying message
* when ^D has been pressed. So just disable PROMPT_SP logic in
* this case */
char *str;
int percents = opts[PROMPTPERCENT];
opts[PROMPTPERCENT] = 1;