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

Re: A completion bug



-----BEGIN PGP SIGNED MESSAGE-----

The patch below fixes a bug in the new completion list logic, pointed
out to me by Zoltan.  The symptom is that if LIST_AMBIGUOUS is unset,
and an unambiguous partial completion is performed, ZLE still thinks
the list is valid, which causes it to insert the unambiguous portion a
second time if completion is continued.

 -zefram

      *** Src/zle_tricky.c.old	Wed Jul 12 15:08:36 1995
      --- Src/zle_tricky.c	Wed Jul 12 15:09:25 1995
      ***************
      *** 3225,3233 ****
        		inststrlen(firstm, 1, ab);
        	    if (ae && !atend)
        		inststrlen(firstm + strlen(firstm) - ae, 0, ae);
        	    if (isset(LISTAMBIGUOUS) && (ab || (ae && !atend))) {
        		lastambig = 0;
      - 		invalidatelist();
        		return;
        	    }
        	}
      --- 3225,3234 ----
        		inststrlen(firstm, 1, ab);
        	    if (ae && !atend)
        		inststrlen(firstm + strlen(firstm) - ae, 0, ae);
      + 	    if(ab || (ae && !atend))
      + 		invalidatelist();
        	    if (isset(LISTAMBIGUOUS) && (ab || (ae && !atend))) {
        		lastambig = 0;
        		return;
        	    }
        	}

-----BEGIN PGP SIGNATURE-----
Version: 2.6.i

iQBVAgUBMAPZiGWJ8JfKi+e9AQF+SwH/X+QczHJD8FT4PWRUMWvZu23ZYdM6wAYJ
r+LcJUElDlrHLoPBMk+EVQai1gbUbLYwzdAkn2Ua6MvgCKVj6AhevQ==
=p+VS
-----END PGP SIGNATURE-----



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