From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id d7e15567 for ; Mon, 15 Jul 2019 18:44:41 +0000 (UTC) Received: (qmail 3484 invoked by alias); 15 Jul 2019 18:44:34 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24065 Received: (qmail 19117 invoked by uid 1010); 15 Jul 2019 18:44:34 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f48.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25510. spamassassin: 3.4.2. Clear:RC:0(209.85.166.48):SA:0(-2.0/5.0):. Processed in 0.79854 secs); 15 Jul 2019 18:44:34 -0000 X-Envelope-From: roman.perepelitsa@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.48 as permitted sender) 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=imEBkqCs3KeLLSj4nK20gAgpQlLSxRWr41chzeZAid4=; b=RIifZFYAwSFMVOxxglwMsleSd9/WzqTI3TJY+IrCxlBUly4GJsSKcpKp0+9l9VTrMs CotCznxTN3vyY+NzDW4eDTmoZIOPKAWaQalez9ltHX8pelpITrxC3v+7M7Y8RcXAg64T tQ45VDuE58oMu33jnXz6hYP7udyCmdjWrtLH4FYLXKSopzbEM46hNvhmSJswWHq+4Ggv 3BdAFBkdYh8Zh6gBnMJNQRE6qBNbSPSFnxDguWQM68RSmBIjSqVhXBwGmtOPY3YggCA4 TX79qiVaSO+72KWheyJ1oOsePY1J0xfLvrBAR0KL2OAY1KlFILsiAxvHPmfh+2uQN7/X Ycjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=imEBkqCs3KeLLSj4nK20gAgpQlLSxRWr41chzeZAid4=; b=sYOm24rqLrEki9iToZwlnzYLEgraihoS5F0PXpQNpWn1WWqoSYlrapRiiVk6dVKJQF J2cEVsXR4GzOo+4g7i6d7F9vaN1IgqVTwTzTV+b3qNLAWXmzJ9Ws3erF0JA6v3h1CTfE fgVhnjfLY+6PQneZEAyaoA14wsYVPY1I5K7FzNvlMNCdB0h2PkDB6hUfR8Tc0hFTwcn6 YS172xMh115JONxUGESFzjH47NuMvuFNMUXEYxsbwyhDlVkmTni81Yf7FIGXlmRrefW7 szt90D0RUQsUJRdk22A0lMVPiHa4cz4/EemVIb0sPoRzKuasGqKhJUcYC+sNKfuXyXeV u1tg== X-Gm-Message-State: APjAAAX0DsBk6i/tUjw7qaW0MIx/0XlxqHIzN7HDFhQWTszKbz+Ub147 qlX0cCxrSb3Jg16wF1XU8p6U+qWvLWF1TAd+hU/kO04oacM= X-Google-Smtp-Source: APXvYqwWBiFE20abdVVgsmysx/NICBQ6nS60Eoml1O5lrv4GmbMTM+FipfckX1nL2igkk7iJmTMn10T8fcNtLPeEQEQ= X-Received: by 2002:a5d:8890:: with SMTP id d16mr25482766ioo.274.1563216241013; Mon, 15 Jul 2019 11:44:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Mon, 15 Jul 2019 20:43:50 +0200 Message-ID: Subject: Re: zle .redisplay sometimes eating up a line To: Sebastian Gniazdowski Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" On Mon, Jul 15, 2019 at 8:31 PM Sebastian Gniazdowski 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.