From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9711 invoked by alias); 27 Mar 2015 15:25:23 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34788 Received: (qmail 3580 invoked from network); 27 Mar 2015 15:25:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=t18EE+hJMojDDH9PNdF3GYYz1ESjOpdXt5hLNrQ8mZw=; b=fOqLZukR6BYKUFWVnIv//P6L2zFmciOYddQLukPYQwi0P7PNAWfep0Cq4TpXSdY5Jw GHPxlUG7AhIIzmaIzQqRT5jm/qfte8Vg51NcHYR0v9QaPxGBXO0Iu7eojuI//pKcRujv h0nA+IYQJTREuhpAy2OUWmiHh0haUD9dpd+YZ7zkc8vo93s0WMXKgDCMIQ8Kvl/9oQlF qcywb9IbEkmmrMl3EKMA72Qxx5G2PYB37y5b32HlFwauhPXQDAXNEg2P9WX9+Q6HZFKw FmUDbSIdXM6CIRMamo9B+j/eV0KdaiduL/KfZpyqH3c/hEt8heMerGOmdbFMMqvGIJ1P ax6w== X-Gm-Message-State: ALoCoQnqED6aDrhVkjILg4WddNoj6LhnTNk0bhbHfcZO/x1yePHVYuw2KNFQkWTuZrizU4aFIdD+ X-Received: by 10.182.116.130 with SMTP id jw2mr16831209obb.48.1427469917879; Fri, 27 Mar 2015 08:25:17 -0700 (PDT) From: Bart Schaefer Message-Id: <150327082515.ZM4134@torch.brasslantern.com> Date: Fri, 27 Mar 2015 08:25:15 -0700 In-Reply-To: <20150327100648.7f8d5aaa@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: PATCH: Removing aliases from history, 2015 style" (Mar 27, 10:06am) References: <20150319105716.620cd931@pwslap01u.europe.root.pri> <20150319125351.1e270c2d@pwslap01u.europe.root.pri> <20150320105703.2754b6af@pwslap01u.europe.root.pri> <150320090420.ZM21908@torch.brasslantern.com> <20150322183556.1fa0f143@ntlworld.com> <150322162235.ZM1728@torch.brasslantern.com> <20150323213426.21fd79c8@ntlworld.com> <20150325154853.7efc21d0@pwslap01u.europe.root.pri> <20150325175706.06cb1a8f@pwslap01u.europe.root.pri> <20150327100648.7f8d5aaa@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: PATCH: Removing aliases from history, 2015 style MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 27, 10:06am, Peter Stephenson wrote: } Subject: Re: PATCH: Removing aliases from history, 2015 style } } it looks like I've managed to make that work less well when } interrupted. If I ^C during the history read I get } } ^CWarning: backing up wrong character. That's probably an unintended side-effect of 34543. Try this: diff --git a/Src/lex.c b/Src/lex.c index 6d0079c..4d8355b 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -513,7 +513,7 @@ cmd_or_math(int cs_type) /* else unsuccessful: unget the whole thing */ hungetc(c); lexstop = 0; - while (lexbuf.len > oldlen && !errflag) { + while (lexbuf.len > oldlen && !(errflag & ERRFLAG_ERROR)) { lexbuf.len--; hungetc(itok(*--lexbuf.ptr) ? ztokens[*lexbuf.ptr - Pound] : *lexbuf.ptr);