zsh-workers
 help / color / mirror / code / Atom feed
From: Greg Klanderman <gak@klanderman.net>
To: zsh-workers@sunsite.dk
Subject: Re: bug with kill-* commands in 4.3.9
Date: Fri, 19 Dec 2008 22:37:21 -0500	[thread overview]
Message-ID: <m3ljubv7ny.fsf@klanderman.net> (raw)
In-Reply-To: <18762.3258.446343.871151@gargle.gargle.HOWL> (Greg Klanderman's message of "Thu, 18 Dec 2008 03:41:30 -0500")

>>>>> Greg Klanderman <gak@klanderman.net> writes:

> Hi, in upgrading from 4.2.5, I notice that a sequence of kill-word or
> kill-line commands followed by a yank no longer yank back all the text
> killed by the sequence of kills, but only the text killed by the last
> kill command.  Would really appreciate if someone could fix this.

OK, so this seems to be due to Peter Stephenson's change to
zle_utils.c in revision 1.47 on 13-Apr-08 in the function cuttext():

@@ -504,7 +494,7 @@
        cutbuf.buf = (ZLE_STRING_T)zalloc(ZLE_CHAR_SIZE);
        cutbuf.buf[0] = ZWC('\0');
        cutbuf.len = cutbuf.flags = 0;
-    } else if (!(lastcmd & ZLE_KILL) || dir < 0) {
+    } else if (!(lastcmd & ZLE_KILL) || (flags & CUT_RAW)) {
        Cutbuffer kptr;
        if (!kring) {
            kringsize = KRINGCTDEF;

The CUT_RAW flag seems to be getting passed here by all the kill
commands, and cuttext() is inhibiting the behavior of appending to the
current kill ring entry when the last command was also a kill because
that flag is set.

Peter, can you give any hint what that change is supposed to be doing?

It seems that "dir < 0" should correspond with "(flags & CUT_REPLACE)";
is that what you intended?  Maybe I'll play around with that change..

thanks,
Greg


  reply	other threads:[~2008-12-20  3:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-18  8:41 Greg Klanderman
2008-12-20  3:37 ` Greg Klanderman [this message]
2008-12-20 19:49   ` Greg Klanderman
2009-01-03 18:18     ` Peter Stephenson
2009-01-04 19:31       ` Greg Klanderman

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=m3ljubv7ny.fsf@klanderman.net \
    --to=gak@klanderman.net \
    --cc=zsh-workers@sunsite.dk \
    /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).