From: lolilolicon <lolilolicon@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-users@zsh.org
Subject: Re: Shift-Insert overwrites ZLE CUTBUFFER
Date: Thu, 27 Oct 2016 00:12:41 +0800 [thread overview]
Message-ID: <CAMtVo_P09j6fyJytA21iu_qOom6bCTvJEWn-dXTBX97Bp00Sdg@mail.gmail.com> (raw)
In-Reply-To: <161026090133.ZM11120@torch.brasslantern.com>
On Thu, Oct 27, 2016 at 12:01 AM, Bart Schaefer
<schaefer@brasslantern.com> wrote:
> What I mean is that it's not easy to do from shell code. In the source
> code obviously the implementation is deliberately pushing the kill ring,
> so it wouldn't be technically difficult to *not* do so, but that would
> mean reversing an earlier design decision.
I assumed the kill ring was used for implementation convenience.
If this was a deliberate design decision, I don't understand how this
is desirable to the user.
This doesn't seem to be documented, so I think it's OK to change it.
>
> Something like this sort of works:
>
> my-bracketed-paste {
> zle .bracketed-paste "$@" && {
> local pasted=$CUTBUFFER
> # Swap the top two killed items to fake out ^Y
> CUTBUFFER=$killring[1]
> killring[1]=$pasted
> }
> }
> zle -N bracketed-paste my-bracketed-paste
>
> But I wouldn't have called that an "easy way".
Nice, thanks for showing me!
>
> Various other approaches involving saving/restoring CUTBUFFER and killring
> are also possible.
next prev parent reply other threads:[~2016-10-26 18:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 12:46 lolilolicon
2016-10-25 16:12 ` Bart Schaefer
2016-10-25 16:28 ` lolilolicon
2016-10-26 16:01 ` Bart Schaefer
2016-10-26 16:12 ` lolilolicon [this message]
2016-10-26 23:51 ` Bart Schaefer
2016-10-27 19:56 ` Greg Klanderman
2016-10-27 20:35 ` Bart Schaefer
2016-10-31 15:56 ` Oliver Kiddle
2016-10-31 16:16 ` Peter Stephenson
[not found] ` <43312.1477929414__19178.7032563754$1477929872$gmane$org@hydra.kiddle.eu>
2016-11-01 17:03 ` Daniel Shahaf
[not found] ` <20161101170328.GA24091__43513.8293811635$1478019914$gmane$org@fujitsu.shahaf.local2>
2016-11-03 19:45 ` Daniel Shahaf
[not found] ` <161026165138.ZM12130__24043.0697137073$1477525984$gmane$org@torch.brasslantern.com>
2016-10-27 0:45 ` Daniel Shahaf
[not found] ` <20161027004500.GA12759__18780.7835791775$1477529337$gmane$org@fujitsu.shahaf.local2>
2016-10-27 12:59 ` Daniel Shahaf
2016-10-26 22:05 ` Mikael Magnusson
2016-10-26 23:59 ` Bart Schaefer
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=CAMtVo_P09j6fyJytA21iu_qOom6bCTvJEWn-dXTBX97Bp00Sdg@mail.gmail.com \
--to=lolilolicon@gmail.com \
--cc=schaefer@brasslantern.com \
--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).