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 5876c7dc for ; Mon, 15 Jul 2019 18:32:05 +0000 (UTC) Received: (qmail 1774 invoked by alias); 15 Jul 2019 18:31:56 -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: 24064 Received: (qmail 10977 invoked by uid 1010); 15 Jul 2019 18:31:56 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f49.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.49):SA:0(-2.0/5.0):. Processed in 2.077582 secs); 15 Jul 2019 18:31:56 -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.49 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=SgetwGZogED9P+dA7tnNQXCx+RHNdZvybkN497eCOmE=; b=NCmJlwbX3Re7fMzHbb/Zhn1DMn7KjuDQLYm+7UWGSD9mxHNH43TWsmXSwiuuFfnPWD RbRCNimjYJaXBUwRMRGwGyy5OL7DIk+uvFn5WUfTI5JdJ/Ba4gkLsbpzAmyua4xedm5/ ktWoihFvDVf1n1bNSf0Loh+rmTmcusyILjBrO1pR7k5u0mcATlepv8fZ1YeQBkbL1wa7 lqUZeUhHN+a7z2hPFL0oAHpJudKQDTkITcLmyB9jPIxQgAfjDE/KGgC1QMtVEVWL/fCH s9ezaG9a7q00ny1f2563EV1Km9sOTrQ+a3TErKWYOuOeOIhrPQc63Q/DZa0mwXyvV/KX 8ixw== 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=SgetwGZogED9P+dA7tnNQXCx+RHNdZvybkN497eCOmE=; b=a61mOsOGbE7FYRFpUJfyBZ2IEvz3E1zHciHOawp7d5agfZnMfSlIDnZ+tFisGoSQv0 swOtAbST1KQ3LzlboBY5L6xEk12IuApXFA9Qk2bTJktfQzrO9WJpw2OA50digHU0zk8F +7w8gZ2IxTj42jIJ74EoJBb67BTHIW96E5fM3GiTbUg++szV9TszjO78W4yGYq73irfX QGs3YU0E0qkUfaiujLlSGyRHPMh04C+FTg3j9z8MX4r/HwgcB3o7YMkhswUcQSgPGunX J3Cv5bgetnnXumM7XEe8TfjAurtHhJ6z6mKNvql8KnAoK52jvXdxCWc8Z2Zpm8n/lF74 5jiQ== X-Gm-Message-State: APjAAAUKvK6fNMGIk7JKzaS4iEw0JGWClWYnHPTafV8MGfhwtJqHlz6z DZHpHs8acL+tj5zNeozbi9N/OQBsHPdxOGXR43c= X-Google-Smtp-Source: APXvYqy3f85IdOx+fj83XSS/OxxxpCtSmztHHXAu9paWL3jurrbNoowEXPlHyHq3nTDI2Qi7ebhKGZr1Wn6mOWhZ310= X-Received: by 2002:a67:80c8:: with SMTP id b191mr18028980vsd.113.1563215480453; Mon, 15 Jul 2019 11:31:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sebastian Gniazdowski Date: Mon, 15 Jul 2019 20:31:08 +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 11:18, Roman Perepelitsa wrote: > What's your $ZSH_PATCHLEVEL? zsh-5.7.1-101-g09385d3 > Could you post self-contained instructions for reproducing this? > Something like this: > > 1. Start `zsh -df`. > 2. Copy-paste this code. The code should not require Internet access. > 3. Press and hold Ctrl+T. > > Roman. The instructions will be not fully self-contained, as the issue reveals itself with 3 plugins being loaded: 1. git clone https://github.com/geometry-zsh/geometry 2. git clone https://github.com/zsh-users/zsh-autosuggestions autos 3. git clone https://github.com/zsh-users/zsh-syntax-highlighting zsyh 4. zsh -dfi 5. source geometry/geometry.plugin.zsh 6. source autos/zsh-autosuggestions.zsh 7. source zsyh/zsh-syntax-highlighting.zsh 8. Paste the code (http://sprunge.us/SAkQxz): deploy-code() { [[ "$1" = <-> && ${#} -eq 1 ]] && { local alltext text IFS=$'\n' nl=$'\n' repeat 25; do read -r -u"$1" text; alltext+="${text:+$text$nl}"; done zle -F "$1"; exec {1}<&- eval "$alltext" return 0 } local THEFD exec {THEFD} < <( # The expansion is: if there is @sleep: pfx, then use what is after # it, otherwise substitute 0 LANG=C sleep $(( 0.005 + ${${${(M)1#@sleep:}:+${1#@sleep:}}:-0} )) print -r -- ${1:#(@code|@sleep:*)} "${@[2,-1]}" ) zle -N deploy-code zle -w -F "$THEFD" deploy-code } deploy-code-widget() { BUFFER+='B'; deploy-code @sleep:0.5 "BUFFER+='a'; zle .redisplay;"; } zle -N deploy-code-widget bindkey "^T" deploy-code-widget 9. Press and long hold Ctrl-T -- Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org