zsh-users
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: zle .redisplay sometimes eating up a line
Date: Mon, 15 Jul 2019 20:43:50 +0200	[thread overview]
Message-ID: <CAN=4vMoO6pxHQ3hrXy4gGK_kS5KxGr_XOnUD4nU3NMFb3tNCog@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVAaAVFROyM1k6w2x8HsBDcqYiqUk=1s_knJ0tAUOMpZFQ@mail.gmail.com>

On Mon, Jul 15, 2019 at 8:31 PM Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
> > What's your $ZSH_PATCHLEVEL?
>
> zsh-5.7.1-101-g09385d3

Good. This rules out a few bugs fixed recently that affect lprompth.

> > Could you post self-contained instructions for reproducing this?
>
> The instructions will be not fully self-contained, as the issue
> reveals itself with 3 plugins being loaded:
>
> [...]

This is too much. The first thing anyone trying to debug this will
have to do is reduce the number of steps that are necessary to
reproduce this bug. If you do it, it makes it that much more likely
someone will care enough to fix the bug.

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

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.

Roman.

  reply	other threads:[~2019-07-15 18:44 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 [this message]
2019-07-15 18:53       ` Sebastian Gniazdowski
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='CAN=4vMoO6pxHQ3hrXy4gGK_kS5KxGr_XOnUD4nU3NMFb3tNCog@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=sgniazdowski@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).