From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: zle .redisplay sometimes eating up a line
Date: Mon, 15 Jul 2019 20:53:56 +0200 [thread overview]
Message-ID: <CAKc7PVCL31hh9+xfYb4ERoWuRrg6g5oL5y_VBMZ9gY=Yrs_FPQ@mail.gmail.com> (raw)
In-Reply-To: <CAN=4vMoO6pxHQ3hrXy4gGK_kS5KxGr_XOnUD4nU3NMFb3tNCog@mail.gmail.com>
On Mon, 15 Jul 2019 at 20:44, Roman Perepelitsa
<roman.perepelitsa@gmail.com> wrote:
> Since the prompt overflow bugs have been ruled out, the next most
> common reason for the prompt to be redisplayed on the previous line is
> when `redisplay` is called after a prior prompt change that wasn't
> followed by `zle -R`. Here's a simple example:
>
> 1. Run `zsh -df`.
>
> 2. Paste this:
>
> function reset() { zle .reset-prompt; zle .redisplay }
> zle -N reset
> bindkey '^T' reset
> PROMPT=$'\n> '
>
> 3. Press Ctrl-T. Observe that prompt moves one line up.
>
> The fix is to call `zle -R` before `zle .redisplay`.
BIG thanks! Adding zle -R before .redisplay call fixed my original
problem, and also the demonstration-sample.
> I'm not saying this is the culprit of your problem but it might be.
> It's hard to tell when the setup for reproducing it requires thousands
> of lines of ZSH scripts.
It was difficult to narrow down the issue as it was hidden somewhere
in the scripts.
next prev parent reply other threads:[~2019-07-15 18:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 3:02 Sebastian Gniazdowski
2019-07-15 9:18 ` Roman Perepelitsa
2019-07-15 18:31 ` Sebastian Gniazdowski
2019-07-15 18:43 ` Roman Perepelitsa
2019-07-15 18:53 ` Sebastian Gniazdowski [this message]
2019-07-16 22:12 ` Sebastian Gniazdowski
2019-07-29 19:13 ` Sebastian Gniazdowski
2019-07-29 21:46 ` Mikael Magnusson
2019-07-29 22:16 ` Sebastian Gniazdowski
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='CAKc7PVCL31hh9+xfYb4ERoWuRrg6g5oL5y_VBMZ9gY=Yrs_FPQ@mail.gmail.com' \
--to=sgniazdowski@gmail.com \
--cc=roman.perepelitsa@gmail.com \
--cc=zsh-users@zsh.org \
/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).