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 90cf6f74 for ; Mon, 15 Jul 2019 18:54:48 +0000 (UTC) Received: (qmail 7292 invoked by alias); 15 Jul 2019 18:54:41 -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: 24066 Received: (qmail 824 invoked by uid 1010); 15 Jul 2019 18:54:41 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f46.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.217.46):SA:0(-2.0/5.0):. Processed in 1.736754 secs); 15 Jul 2019 18:54:41 -0000 X-Envelope-From: sgniazdowski@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.217.46 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=o7CkeeKoIpxEFIb800LadbEuFDaHI117SexxtcYd4kw=; b=ojsRQR33S/NFV3yNDL3ZWRFCbWe6mHOayrY8PMcy+ztQaUdJiaYZJ9CXutEGI8itJL +3iF+SGZdM9UYql8sREPcNloIsGuZvp+THCBuQwo+bEtl9WlIGAmg30kNu2Bo5Ruzov5 1Vtqgbq6fNjurVRA/qqNE6BHVHl6ruADFUFP/Xppv7HAj/u6ZQJJuyhNoTHM828zvLy4 SOXztkC17a4GiQhiX6dujc9T/4pkOIIHFmurfIxWsE85nfAsmahr6d+t24s1oE77OHT6 kx5yigm7PGao7V8C5vQcaHOvVW+PStc5SZLSmVEj2oCglQmnn/8NuMGkMAWJUsZBfUTq 9JgA== 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=o7CkeeKoIpxEFIb800LadbEuFDaHI117SexxtcYd4kw=; b=NtuOnYx7LWE82gU4z/XMmzC0g1pm1y5BxXEGjUfH6PNw1xhc3Mkj2eNiFAZ3C0PXLx jYPyegLWh8yuY380MrsAlWR+jhHP2ZwknxoeYSa6Lma+W1PabyGQ8gJ8b4/WR2HUFyea MqCtUaEe1mIx/L+DOBm7pRRVeoH+Np7x28yuf2ctiyNNScQnSiyV7FZscicQkM7W0x0c 1QL1dz8ma/xsrMr3d2AAG0lHnU7fLLjQYaHJBtZ+cHKGuv33oq3njnCe3yOFCxa9I4nK bD0uf1HqTosyNzjTCMuJualGKY9jZ8mTxPw+/ua6nVH3+zTgWCSbAzo8qDa5asQzSgcV miuA== X-Gm-Message-State: APjAAAX+bwr01YLVQ+33C6ex+0BN/jWwnU4djK2Zy17gJgUYkt1TgUzs SpIIPsV6uzmXGohA0byMxh+18o+aos+VhyK8uuI= X-Google-Smtp-Source: APXvYqyVGdDPicWCPbWusSmBl54nk/4nGsJwpu/FspsRpLuROYhTuxsoKb0pcCSgTtQoTKjt8QmUTxpgo8SmdoJ84Ng= X-Received: by 2002:a67:694f:: with SMTP id e76mr1433802vsc.77.1563216847457; Mon, 15 Jul 2019 11:54:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sebastian Gniazdowski Date: Mon, 15 Jul 2019 20:53:56 +0200 Message-ID: Subject: Re: zle .redisplay sometimes eating up a line To: Roman Perepelitsa Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" On Mon, 15 Jul 2019 at 20:44, Roman Perepelitsa 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.