From ac1c48349664604fbaf5a69130be94ad0f472682 Mon Sep 17 00:00:00 2001 From: Andrey Borzenkov Date: Thu, 10 May 2007 11:36:22 +0000 Subject: 23409: disable prompt_sp output after ^D was seen and message printed --- Src/utils.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Src/utils.c') diff --git a/Src/utils.c b/Src/utils.c index 35915a2e7..98d441aa0 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -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; -- cgit 1.4.1