zsh-workers
 help / color / mirror / code / Atom feed
* Multi-line prompt and terminal window resize
@ 2009-06-28 18:55 Tomáš Nechutný
  2009-06-28 19:30 ` Mikael Magnusson
  0 siblings, 1 reply; 2+ messages in thread
From: Tomáš Nechutný @ 2009-06-28 18:55 UTC (permalink / raw)
  To: zsh-workers

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).


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Multi-line prompt and terminal window resize
  2009-06-28 18:55 Multi-line prompt and terminal window resize Tomáš Nechutný
@ 2009-06-28 19:30 ` Mikael Magnusson
  0 siblings, 0 replies; 2+ messages in thread
From: Mikael Magnusson @ 2009-06-28 19:30 UTC (permalink / raw)
  To: Tomáš Nechutný; +Cc: zsh-workers

2009/6/28 Tomáš Nechutný <nechtom@gmail.com>:
> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-28 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-28 18:55 Multi-line prompt and terminal window resize Tomáš Nechutný
2009-06-28 19:30 ` Mikael Magnusson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).