ZSH - RPROMPT repeats line on resize
Tested on 2.9 Beta through Homebrew Cask as well as from Git repo. I am unable to reproduce this in Terminal.app, so I'm pretty sure it's due to iTerm2.
My .zshrc has been simplified to RPROMPT="*"
Which adds the * char to the right aligned prompt. Originally was curious why prior RPROMPTs rendered would not remain right aligned when width increased or went onto a new line when width was decreased. Presumably it's padded by spaces and default terminal wrapping works as it would with regular text. Stumbled upon this bug though while figuring that out.
When resizing the current prompt line seems to redraw itself to right align the RPROMPT, if this is done too fast you momentarily see 2 lines with one having a slight offset for the RPROMPT, afterwards the 2nd line disappears and you have the result. If this has been happening though you're able to scroll up and see the same prompt line with the RPROMPT printed at different widths while resizing. If the active prompt line was not the top line at the time it'll push the above lines up with these clones until it is.
If you resize slowly this doesn't happen, so perhaps a race condition of some kind where the active prompt doesn't get overwritten but a new line is used instead?
This issue may be similar, it's possible the bug may have been introduced by the fix here?