zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: More vared repairs
@ 2000-10-22  2:27 Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2000-10-22  2:27 UTC (permalink / raw)
  To: zsh-workers

The -e option, added in zsh-workers/9396 but never mentioned in ChangeLog,
didn't do the right thing in combination with -h, because the call to
hbegin() (also added in 9396) also sets `isfirstln = 1'.  In other words,
using -h always implied -e, which probably was not the desired effect.

It further doesn't seem to me that vared should ever pay attention to the
setting of IGNOREEOF.  If you don't use -e, you can't generate an EOF in
any case, and if you use -e you've asked for EOF behavior.

Index: Src/Zle/zle_main.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_main.c,v
retrieving revision 1.12
diff -u -r1.12 zle_main.c
--- Src/Zle/zle_main.c	2000/10/21 03:15:36	1.12
+++ Src/Zle/zle_main.c	2000/10/22 02:26:39
@@ -748,7 +748,7 @@
     struct value vbuf;
     Value v;
     Param pm = 0;
-    int create = 0, ifl;
+    int create = 0, ifl, ieof;
     int type = PM_SCALAR, obreaks = breaks, haso = 0;
     char *p1 = NULL, *p2 = NULL;
     FILE *oshout = NULL;
@@ -900,11 +900,13 @@
 
     varedarg = *args;
     ifl = isfirstln;
-    if (ops['e'])
-	isfirstln = 1;
     if (ops['h'])
 	hbegin(2);
+    isfirstln = ops['e'];
+    ieof = opts[IGNOREEOF];
+    opts[IGNOREEOF] = 0;
     t = (char *) zleread(p1, p2, ops['h'] ? ZLRF_HISTORY : 0);
+    opts[IGNOREEOF] = ieof;
     if (ops['h'])
 	hend(NULL);
     isfirstln = ifl;

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-10-22  2:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-22  2:27 PATCH: More vared repairs Bart Schaefer

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