Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: exit status problem

On Dec 7,  1:24pm, Vincent Lefevre wrote:
} Yes, when I hit [Enter], the following two things occurred:
} 1. the current prompt (shown in Screenshot 1) was *replaced* by
}    the one with 16:00:03;
} 2. a new prompt was printed (the one with 16:00:37).
} I think that (1) should have been done at resize time. That would
} also solve the problem mentioned above about %*.
} [...] there are the same problems with GNOME Terminal. So, I think
} that the bug is in zsh. Are you sure that zsh flushes its output?

zrefresh() definitely calls fflush(shout), but refreshline() (which
is sometimes called after the flush) seems ultimately to be relying
on fputc() [at the end of a convoluted path through various macros
and wide character handling].

You could try applying this hunk to Src/Zle/zle_refresh.c to see if
that appears to clear up the problem [this is at the very end of
refreshline()] but I'm not confident that's the best place to call
fflush() for the general case.  (Line numbers may be inaccurate.)

@@ -2069,6 +2124,8 @@
 		 (nl->chr == WEOF && ol->chr));
+    fflush(shout);
 /* move the cursor to line ln (relative to the prompt line),

Messages sorted by: Reverse Date, Date, Thread, Author