From: Bart Schaefer <schaefer@brasslantern.com>
To: Thomas Lauer <thomas.lauer@virgin.net>
Cc: Peter Stephenson <p.w.stephenson@ntlworld.com>,
Zsh Users <zsh-users@zsh.org>
Subject: Re: zle oddity or some option running wild?
Date: Thu, 27 Jun 2024 21:35:45 -0700 [thread overview]
Message-ID: <CAH+w=7aR4KOJo2jt7UUWe227t6E907vvLXppRhOcMa6mM=Eryw@mail.gmail.com> (raw)
In-Reply-To: <d63r7jh5lcleq5siufj95i80aih34k040p@tlc.com>
On Thu, Jun 27, 2024 at 9:08 AM Thomas Lauer <thomas.lauer@virgin.net> wrote:
>
> From: Peter Stephenson <p.w.stephenson@ntlworld.com>
> Date: Thu, 27 Jun 2024 16:41:50 +0100 (BST)
>
> > This is likely to be something to do with the "zle -f" stuff documented
> > in the zshzle manual page
>
> Whatever the cause, select-word-style seems to change something globally
> in a way that isn't helpful (to my use case).
I think it's this:
backward-kill-word-match- if [[ -n $done || $LASTWIDGET = *kill* ]]; then
backward-kill-word-match: CUTBUFFER="$word$CUTBUFFER"
backward-kill-word-match- else
kill-word-match- if [[ -n $done || $LASTWIDGET = *kill* ]]; then
kill-word-match: CUTBUFFER="$CUTBUFFER$word"
kill-word-match- else
The kill widget replacements try to reproduce the builtin behavior of
building up the cutbuffer as they are called repeatedly. If you use
widget names containing "kill" that are not supposed to have that
behavior, and then call through to those replacements, unexpected
things are going to happen.
You should also probably be selectively using one or both of -w and -f as in
zle widgetname -w -f nolast
to change and/or restore LASTWIDGET when calling one widget from
inside another, so that actions that differ on the second and
successive repeated calls behave properly.
next prev parent reply other threads:[~2024-06-28 4:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 16:10 Thomas Lauer
2024-06-26 16:38 ` Thomas Lauer
2024-06-27 15:19 ` Thomas Lauer
2024-06-27 15:41 ` Peter Stephenson
2024-06-27 16:08 ` Thomas Lauer
2024-06-28 4:35 ` Bart Schaefer [this message]
2024-06-28 13:48 ` Thomas Lauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7aR4KOJo2jt7UUWe227t6E907vvLXppRhOcMa6mM=Eryw@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=p.w.stephenson@ntlworld.com \
--cc=thomas.lauer@virgin.net \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).