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

Re: more on the lexing bug



Zefram wrote:
> % \
> > ^D
> internal:  uncompleted line in history
> 
> and the shell exits.

What's even worse,

% echo executing command unexpectedly... \
> ^D
internal:  uncompleted line in history
executing command unexpectedly...

Probably ^D shouldn't behave like EOF within zle unless it's the first
character on the first line of input only.  After all, it's expected
to behave like a continuation of the current line, not a new line.  I
think the following patch fixes the behaviour.  It's so simple I can't
help wondering if somebody removed the isfirstln before for some reason?

*** Src/zle_main.c.ctrld	Fri Jan  3 14:33:35 1997
--- Src/zle_main.c	Fri Jan  3 14:33:14 1997
***************
*** 428,434 ****
  
  	    statusline = NULL;
  	    bindk = getkeycmd();
! 	    if (!ll && c == eofchar) {
  		eofsent = 1;
  		break;
  	    }
--- 428,434 ----
  
  	    statusline = NULL;
  	    bindk = getkeycmd();
! 	    if (!ll && isfirstln && c == eofchar) {
  		eofsent = 1;
  		break;
  	    }

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