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

added space bug fix



This fixes the extremely annoying bug in zsh 3.1.2 that spaces get
repeatedly added at the end of the line during menucompletion.  It
does it by null-terminating the line when the space is deleted (the
logic is set up so that the space is added in case it isn't menu
completion then deleted again when it turns out it is).

It's possible the line should be null-terminated in zle_refresh.c
instead/also, or that some other code should pay more attention to the
line length variable ll, but I don't dare touch any of that.

*** Src/Zle/zle_utils.c.sc	Sun Jun  1 07:50:52 1997
--- Src/Zle/zle_utils.c	Thu Jun 26 11:06:10 1997
***************
*** 75,81 ****
  	line[to] = line[to + cnt];
  	to++;
      }
!     ll = to;
  }
  
  /**/
--- 75,81 ----
  	line[to] = line[to + cnt];
  	to++;
      }
!     line[ll = to] = '\0';
  }
  
  /**/

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.



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