Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zle .redisplay sometimes eating up a line
- X-seq: zsh-users 24064
- 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:31:08 +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=SgetwGZogED9P+dA7tnNQXCx+RHNdZvybkN497eCOmE=; b=NCmJlwbX3Re7fMzHbb/Zhn1DMn7KjuDQLYm+7UWGSD9mxHNH43TWsmXSwiuuFfnPWD RbRCNimjYJaXBUwRMRGwGyy5OL7DIk+uvFn5WUfTI5JdJ/Ba4gkLsbpzAmyua4xedm5/ ktWoihFvDVf1n1bNSf0Loh+rmTmcusyILjBrO1pR7k5u0mcATlepv8fZ1YeQBkbL1wa7 lqUZeUhHN+a7z2hPFL0oAHpJudKQDTkITcLmyB9jPIxQgAfjDE/KGgC1QMtVEVWL/fCH s9ezaG9a7q00ny1f2563EV1Km9sOTrQ+a3TErKWYOuOeOIhrPQc63Q/DZa0mwXyvV/KX 8ixw==
- In-reply-to: <CAN=4vMp+e9bjzFN5Um8gL_z_mg61A0b1oKTXn3xqex8Rff2vJA@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>
On Mon, 15 Jul 2019 at 11:18, Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author