Subject: bug#30544: 26.0.91; ansi-term duplicates 2 line zsh prompts any time windows change (maybe other times)

From: Noam Postavsky <[email-masked]>
Date: Wed, 14 Mar 2018 21:42:03 -0400

Aaron Jensen <[email-masked]> writes:

> On Wed, Mar 14, 2018 at 6:06 PM, Noam Postavsky <[email-masked]> wrote:
>> Yes, I did PROMPT=$'one\ntwo' (by the way, I found I had to remove
>> 'prompt adam1' from my .zshrc (the default setup puts it in), otherwise
>> setting PROMPT has no effect).  I can reproduce the problem in term.el,
>> but urxvt doesn't have any problems no matter how I resize.
>
> Ah, apparently I can only reproduce it in iterm2 if I have an RPROMPT
> that does a lineup and linedown to get the RPROMPT on the first
> line...
>
> PROMPT=$'one\ntwo'
> local _lineup=$'\e[1A'
> local _linedown=$'\e[1B'
> RPROMPT='%{${_lineup}%}%*%{${_linedown}%}'

Not sure if I'm missing some zsh context here, but when I do that, I see
literal "lineup" and "linedown" at the right.  If do instead

PROMPT=$'one\ntwo'
RPROMPT=$'%{\e[1A%}%*%{\e[1B%}'

Then I get the current time on right, and still no prompt duplication
when resizing urxvt.