Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zle .redisplay sometimes eating up a line
- X-seq: zsh-users 24066
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: zle .redisplay sometimes eating up a line
- Date: Mon, 15 Jul 2019 20:53:56 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o7CkeeKoIpxEFIb800LadbEuFDaHI117SexxtcYd4kw=; b=ojsRQR33S/NFV3yNDL3ZWRFCbWe6mHOayrY8PMcy+ztQaUdJiaYZJ9CXutEGI8itJL +3iF+SGZdM9UYql8sREPcNloIsGuZvp+THCBuQwo+bEtl9WlIGAmg30kNu2Bo5Ruzov5 1Vtqgbq6fNjurVRA/qqNE6BHVHl6ruADFUFP/Xppv7HAj/u6ZQJJuyhNoTHM828zvLy4 SOXztkC17a4GiQhiX6dujc9T/4pkOIIHFmurfIxWsE85nfAsmahr6d+t24s1oE77OHT6 kx5yigm7PGao7V8C5vQcaHOvVW+PStc5SZLSmVEj2oCglQmnn/8NuMGkMAWJUsZBfUTq 9JgA==
- In-reply-to: <CAN=4vMoO6pxHQ3hrXy4gGK_kS5KxGr_XOnUD4nU3NMFb3tNCog@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVD-7We+6JFGQOz2X+TunjWzdifc1i2BWZNd9yv8L94g=w@mail.gmail.com> <CAN=4vMp+e9bjzFN5Um8gL_z_mg61A0b1oKTXn3xqex8Rff2vJA@mail.gmail.com> <CAKc7PVAaAVFROyM1k6w2x8HsBDcqYiqUk=1s_knJ0tAUOMpZFQ@mail.gmail.com> <CAN=4vMoO6pxHQ3hrXy4gGK_kS5KxGr_XOnUD4nU3NMFb3tNCog@mail.gmail.com>
On Mon, 15 Jul 2019 at 20:44, Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author