zsh-workers
 help / color / mirror / code / Atom feed
* bug with kill-* commands in 4.3.9
@ 2008-12-18  8:41 Greg Klanderman
  2008-12-20  3:37 ` Greg Klanderman
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Klanderman @ 2008-12-18  8:41 UTC (permalink / raw)
  To: Zsh list


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.

thanks,
Greg


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bug with kill-* commands in 4.3.9
  2008-12-18  8:41 bug with kill-* commands in 4.3.9 Greg Klanderman
@ 2008-12-20  3:37 ` Greg Klanderman
  2008-12-20 19:49   ` Greg Klanderman
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Klanderman @ 2008-12-20  3:37 UTC (permalink / raw)
  To: zsh-workers

>>>>> 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bug with kill-* commands in 4.3.9
  2008-12-20  3:37 ` Greg Klanderman
@ 2008-12-20 19:49   ` Greg Klanderman
  2009-01-03 18:18     ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Klanderman @ 2008-12-20 19:49 UTC (permalink / raw)
  To: zsh-workers

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

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

Indeed, it would appear that changing CUT_RAW to CUT_REPLACE in the
function cuttext() in zle_utils.c fixes the problem.

Greg



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bug with kill-* commands in 4.3.9
  2008-12-20 19:49   ` Greg Klanderman
@ 2009-01-03 18:18     ` Peter Stephenson
  2009-01-04 19:31       ` Greg Klanderman
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 2009-01-03 18:18 UTC (permalink / raw)
  To: zsh-workers

On Sat, 20 Dec 2008 14:49:24 -0500
Greg Klanderman <gak@klanderman.net> wrote:
> >>>>> Greg Klanderman <gak@klanderman.net> writes:
> 
> > It seems that "dir < 0" should correspond with "(flags & CUT_REPLACE)";
> > is that what you intended?  Maybe I'll play around with that change..
> 
> Indeed, it would appear that changing CUT_RAW to CUT_REPLACE in the
> function cuttext() in zle_utils.c fixes the problem.

Exactly.  Thanks for the investigation.  I've fixed it.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bug with kill-* commands in 4.3.9
  2009-01-03 18:18     ` Peter Stephenson
@ 2009-01-04 19:31       ` Greg Klanderman
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Klanderman @ 2009-01-04 19:31 UTC (permalink / raw)
  To: zsh-workers

>>>>> Peter Stephenson <p.w.stephenson@ntlworld.com> writes:

> Exactly.  Thanks for the investigation.  I've fixed it.

Thank you Peter and Happy New Year!

greg


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-01-04 19:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-18  8:41 bug with kill-* commands in 4.3.9 Greg Klanderman
2008-12-20  3:37 ` Greg Klanderman
2008-12-20 19:49   ` Greg Klanderman
2009-01-03 18:18     ` Peter Stephenson
2009-01-04 19:31       ` Greg Klanderman

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).