Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] isearch: do not use PAT_STATIC since we call zle hooks
- X-seq: zsh-workers 40313
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>
- Subject: Re: [PATCH] isearch: do not use PAT_STATIC since we call zle hooks
- Date: Mon, 9 Jan 2017 01:35:26 +0000
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=ws3JaqzUrTSP/rA bG6d1AmwOUxA=; b=he7Sr4P3756Mo4KdSKBDGFglF4ffeBME82BwgScOSNZuj/k GmLz3Qvl+dmgD21HdoadbtStKkpOITOkBfZYYb3SHWS2rSisRO83oYVSHgshZsud vHoLSICMMu461wZ1/NnhevbdFiyTuNuoeV1z0tpBWMnthpUPcSUC+WOEmOBQ=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=ws3JaqzUrTSP/r AbG6d1AmwOUxA=; b=RcVWLS+/BTOZqLHb9EPm1OennGrhGYO+x2RLQhr1Tcfoth Qs6xH6j2jjdFxo441lnTugf4bqfOeIJEwzllo/a4PnbKvoX4QxetLtTsi22Aw5zn Dfhqc0dUyIqc/t6cKsa/FSYsNkzqkVdWhjLqqD7qy3byWkn0r8M5xYCd9Iog4=
- In-reply-to: <20170106172541.GA14113@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20170106172541.GA14113@fujitsu.shahaf.local2>
m0viefreak wrote on Fri, Jan 06, 2017 at 17:25:41 +0000:
> Minimal reproducing example:
>
> % bindkey '^R' history-incremental-pattern-search-backward
> % evil_hook() { a=(); : ${a[(r)foo*]}; };
> % zle -N zle-isearch-update evil_hook
> % : foo
> % : bar
> % : baz
> %
>
> type: <^R>b
> % : baz
> bck-i-search: b_
>
> type: <^R>
> % : foo
> bck-i-search: b_
>
> ': foo' is found instead of ': bar' because evil_hook modified the
> static pattern used in isearch.
>
> Related: zsh-syntax-highlighting issue which found this bug:
> https://github.com/zsh-users/zsh-syntax-highlighting/issues/407
Is there a way to probe for this bug at runtime? I.e., a way for
a script to determine whether the zsh binary that interprets it has or
hasn't this bug?
We need this in z-sy-h to choose between two codepaths (and we'd
rather not use is-at-least in case distros backport m0vie's patch).
Thanks,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author