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

Multiline prompt woes



Hi there,

I've run into a somewhat annoying issue with multi-line prompts (even really
simple ones, such as "\n%~").  When the terminal is redrawn, for example
because of resizing the terminal window, the prompt gets messed up.  I don't
know how to describe this easily, but an example should make it clear.  Say my
multiline prompt is

LINE 1
LINE 2
%

Then, after redrawing, the screen shows

LINE 1
LINE 2
LINE 1
LINE 2
%

My suspicion is that zsh redraws the prompt upon resizing the window, and to do
this it simply goes back to the beginning of the current line (the third one),
and then draws the prompt from there, thereby duplicating the first two lines.
Interestingly enough, repeated resizing of the window does not lead to copies
of the first two lines to pile up.  It happens only once.  Once I run a
command, however, I can trigger the same behaviour with the next prompt again.

So, is there anything special I need to do to get zsh to handle multiline
prompts correctly?  Is this a bug?  If so, is it known?  Any feedback would be
appreciated.

Cheers,
Norbert



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