zsh-users
 help / color / mirror / code / Atom feed
* 4.1.1: three bugs?
@ 2003-07-29  7:45 GoTaR
  2003-07-29  9:51 ` Wayne Davison
  0 siblings, 1 reply; 3+ messages in thread
From: GoTaR @ 2003-07-29  7:45 UTC (permalink / raw)
  To: zsh-users

Hi!

1. completion system:

a)

~/rpm/BUILD/zsh-4.1.1/Src: ./zsh
~/rpm/BUILD/zsh-4.1.1/Src: make [tab]zsh: segmentation fault  ./zsh
~/rpm/BUILD/zsh-4.1.1/Src:

b) I underlined what is highlighted by zsh.

~/d: ls *
aa:
a2  a3  a4

ab:
b2  b3  b4


~/d: ls a/[tab]
files
aa/  ab/

[tab]

~/d: ls aa/a2
files
aa/  aa/  aa/  ab/  ab/  ab/
^^^

[tab]

~/d: ls aa/a3
files
aa/  aa/  aa/  ab/  ab/  ab/
     ^^^

[tab]

~/d: ls aa/a4
files
aa/  aa/  aa/  ab/  ab/  ab/
          ^^^

[tab]

~/d: ls ab/b2
files
aa/  aa/  aa/  ab/  ab/  ab/
               ^^^

[tab]

~/d: ls ab/b3
files
aa/  aa/  aa/  ab/  ab/  ab/
                    ^^^

[tab]

~/d: ls ab/b4
files
aa/  aa/  aa/  ab/  ab/  ab/
                         ^^^

IMHO it should be:

~/d: ls a...
files
aa/a2  aa/a3  aa/a4  ab/b2  ab/b3  ab/b4


2. command line interpreter:

~: zsh
~: slfj zxc ewtg lkjlk
            ^move cursor here and press alt-d
~: slfj zxc  lkjlk
                  ^move cursor here and press twice alt-y
~: slfj zxc  lkjlkzsh: segmentation fault  zsh

Operations from 2nd and 3rd line should be repeated sometimes.

Do you want some informations about my system?

-- 
         GoTaR <priv0.onet.pl->gotar>
      http://mops.uci.agh.edu.pl/~gotar/
GEOS:.  http://informatica.agh.edu.pl/  .:LF&A


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

* Re: 4.1.1: three bugs?
  2003-07-29  7:45 4.1.1: three bugs? GoTaR
@ 2003-07-29  9:51 ` Wayne Davison
  2003-07-29 10:01   ` Wayne Davison
  0 siblings, 1 reply; 3+ messages in thread
From: Wayne Davison @ 2003-07-29  9:51 UTC (permalink / raw)
  To: GoTaR; +Cc: zsh-users

On Tue, Jul 29, 2003 at 09:45:54AM +0200, GoTaR wrote:
> ~: zsh
> ~: slfj zxc ewtg lkjlk
>             ^move cursor here and press alt-d

A second (separate) word-delete is needed to get the code to fail, so
I typed ctrl-y, alt-b, alt-d after this.

> ~: slfj zxc  lkjlk
>                   ^move cursor here and press twice alt-y
> ~: slfj zxc  lkjlkzsh: segmentation fault  zsh

Cause: the first alt-y is considered a yank command, even though it
fails.  Thus, the second alt-y can slip by the sanity check at the start
of the yankpop() function, and if "kctbuf" is NULL (as it is if there
was no ctrl-y ever performed), zsh crashes.

The following patch fixes this:

--- Src/Zle/zle_misc.c	27 Feb 2003 11:32:53 -0000	1.8
+++ Src/Zle/zle_misc.c	29 Jul 2003 09:36:12 -0000
@@ -372,8 +372,10 @@
     int cc, kctstart = kct;
     Cutbuffer buf;
 
-    if (!(lastcmd & ZLE_YANK) || !kring)
+    if (!(lastcmd & ZLE_YANK) || !kring || !kctbuf) {
+	kctbuf = NULL;
 	return 1;
+    }
     do {
 	/*
 	 * This is supposed to make the yankpop loop

Setting kctbuf to NULL on failure prevents the user from getting a
yanked value out of two consecutive alt-y keystrokes in the case where a
ctrl-y was performed at some point in the past (but not immediately
prior to the alt-y).

I'll commit this to CVS.

..wayne..


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

* Re: 4.1.1: three bugs?
  2003-07-29  9:51 ` Wayne Davison
@ 2003-07-29 10:01   ` Wayne Davison
  0 siblings, 0 replies; 3+ messages in thread
From: Wayne Davison @ 2003-07-29 10:01 UTC (permalink / raw)
  To: zsh-users

On Tue, Jul 29, 2003 at 02:51:11AM -0700, Wayne Davison wrote:
> A second (separate) word-delete is needed to get the code to fail, so
> I typed ctrl-y, alt-b, alt-d after this.

Oops, no I didn't.  I couldn't have used ctrl-y or it wouldn't have
crashed.  I undoubtedly used ctrl-_, alt-b, alt-b, alt-d instead.

..wayne..


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

end of thread, other threads:[~2003-07-29 10:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29  7:45 4.1.1: three bugs? GoTaR
2003-07-29  9:51 ` Wayne Davison
2003-07-29 10:01   ` Wayne Davison

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