From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27577 invoked by alias); 8 Oct 2010 17:05:16 -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: 28332 Received: (qmail 21592 invoked from network); 8 Oct 2010 17:05:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) 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, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) X-Authentication-Warning: pwslap01u.europe.root.pri: pws owned process doing -bs To: zsh-workers@zsh.org (Zsh hackers list) Subject: PATCH: another one of those X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.1.1 Date: Fri, 08 Oct 2010 18:04:53 +0100 Message-ID: <13175.1286557493@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 08 Oct 2010 17:04:54.0892 (UTC) FILETIME=[EDE7DAC0:01CB670A] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-10-90-03 (www.mailcontrol.com) on 10.71.0.134 Index: Src/hist.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/hist.c,v retrieving revision 1.104 diff -p -u -r1.104 hist.c --- Src/hist.c 7 Oct 2010 16:49:50 -0000 1.104 +++ Src/hist.c 8 Oct 2010 17:04:13 -0000 @@ -2358,8 +2358,18 @@ readhistfile(char *fn, int err, int read incnode(wordnode)) { char *word = getdata(wordnode); - while (inblank(*pt)) - pt++; + for (;;) { + /* + * Not really an oddity: "\\\n" is + * removed from input as if whitespace. + */ + if (inblank(*pt)) + pt++; + else if (strpfx("\\\n", pt)) + pt += 2; + else + break; + } if (!strpfx(word, pt)) { int bad = 0; /* -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom