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

Re: experimental new style completion



Another small fix to the new style completion stuff. This time it's
a memory problem: with -k you can give the code an array. When
building the things to put into the command line it uses the strings
in it before copying them. The only easy solution I currently see is
to move the call to dupstring() up, although that will sometimes
create copies that aren't needed. Hm.

Bye
 Sven

*** Src/Zle/zle_tricky.c.old	Thu Jan 21 17:02:28 1999
--- Src/Zle/zle_tricky.c	Thu Jan 21 17:03:05 1999
***************
*** 2552,2557 ****
--- 2552,2559 ----
      hn = (HashNode) t;
      pm = (Param) t;
  
+     if (incompfunc)
+ 	s = dupstring(s);
      if (!addwhat) {
  	test = 1;
      } else if (addwhat == -1 || addwhat == -5 || addwhat == -6 ||
***************
*** 2687,2694 ****
      }
      if (!test)
  	return;
-     if (incompfunc)
- 	s = dupstring(s);
      if (!ms && !ispattern && ai->firstm) {
  	if ((test = sl - pfxlen(ai->firstm->str, s)) < ai->prerest)
  	    ai->prerest = test;
--- 2689,2694 ----

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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