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

Re: Multi-line prompt and terminal window resize



2009/6/28 TomÃÅ Nechutnà <nechtom@xxxxxxxxx>:
> Hello,
>
> I have multiline prompt:
>
> PROMPT="%n:%~
> $ "
>
> I noticed that after resizing terminal window (konsole and urxvt), zsh adds
> extra first line of prompt. But only after startup or when you type something
> before resizing (eg. when you resize n-times and don't type anything it
> happens just once).

If you have RPS1 set to something, I can explain what happens: The
problem is that urxvt reflows lines when you resize the terminal,
which can add a line, then zsh redraws it too, which keeps half of the
old line. I have no idea why it happens with a multiline prompt
though; it seems zsh doesn't output spaces to the end of the first
line. You get a quite fun effect if you setopt promptcr promptsp and
do echo -n foo, then resize (wider or narrower).

-- 
Mikael Magnusson



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