Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bug with kill-* commands in 4.3.9



>>>>> Greg Klanderman <gak@xxxxxxxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author