zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: "Tomáš Nechutný" <nechtom@gmail.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: Multi-line prompt and terminal window resize
Date: Sun, 28 Jun 2009 21:30:29 +0200	[thread overview]
Message-ID: <237967ef0906281230lc27eabcr177018fbddfe27e2@mail.gmail.com> (raw)
In-Reply-To: <200906282055.34430.nechtom@gmail.com>

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


      reply	other threads:[~2009-06-28 19:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-28 18:55 Tomáš Nechutný
2009-06-28 19:30 ` Mikael Magnusson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=237967ef0906281230lc27eabcr177018fbddfe27e2@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=nechtom@gmail.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).