From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21204 invoked by alias); 26 Jul 2016 18:28:08 -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: 38953 Received: (qmail 12404 invoked from network); 26 Jul 2016 18:28:08 -0000 X-Qmail-Scanner-Diagnostics: from nm38-vm9.bullet.mail.ir2.yahoo.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(212.82.97.159):SA:0(0.0/5.0):. Processed in 0.135294 secs); 26 Jul 2016 18:28:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: okiddle@yahoo.co.uk X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.mail.yahoo.com designates 212.82.97.159 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1469557326; bh=YleQQmArgtWUkDWq/dq5JGvEqPyDITZo3R3Rlu2NHAc=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=KrF8gGsiYZCR7rqcn22hFTGXoggvmxupfJmLZ51Gu7HHzECzTLeTz4NhauFUdU1eChAu9lA9uoulQdruxeU+mqUmGZJMnplTdPqpf9JugV6fNWYH3avDTPul6oTne5DbB+hfbRmWDZT62uQqCWM2j4wqpD859eNstPTKgqa5QvozlCVniWBMndl+9CRt6sdEkyulxWF/V0adYsEb2rsBVRetk6owJ0MwslnaUqx6jsM4F9W6gmIzfYeuU1P9TO8NvyUmaYZz6cs0wvUpB6ta2eKp9STDtlGcQwL407SysNQ/mWz3YWPeKx4cyeieBruFR+aIoSEtYWvBh2alU+si9w== X-Yahoo-Newman-Id: 429155.3844.bm@smtp149.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: vMdtcbcVM1kXBXkZq_3qwBOg41NKhv2IohEyNPvTe8a0O93 jKxf6ZvNjKgI1KtzPfAqgqDrUVj.VQQmTI05vE9FuHAY3v7XQ8ddLhEnN0gA xLISjKpCJT7txkAsNc58NkbsjsC57p9XOXlrpUbQZ0dwtwb4QMM.kkqbno7F C3t_TpSFoHyzEVBWYp_h8eUc4plUPIwvvrvhM0gBfp55W0FpHb7t7.lYiWDT JjF66PQPudChFb9Md80JBfrQlcYxdOc93qwewb0G5M8Tm9rgdGgTIFmZDyds jVPsyDLYRVYK.VHk.khdSQjff4_uNTXxNkB_pcyA8OYOqAB4IxhxZ2rBe8DW Ewm.0X5Wr3goLwLmnh6UUQAWCk1z5hWXI9Na.F1Hlm3ujAAepSG6gvf4qzSy s9cwczH2HPekZSwIt2BDYJ5bJxCrau5U5TUlJKumkaP7kK6WqWV3E0.B0O8i .oBmXcgT8dkE5Ue_8LNsHB_I73kx8VNiKk.5EfrL.8rosXQMDUWssWJCWwSV MScq_JsU12WrlH8yOa5ez7AKp7vDiws52xLBCEcap1ak- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <20160726145224.7910b718@pwslap01u.europe.root.pri> From: Oliver Kiddle References: <588168129.3340906.1467709726474.JavaMail.yahoo.ref@mail.yahoo.com> <588168129.3340906.1467709726474.JavaMail.yahoo@mail.yahoo.com> <20160705111900.7e1599f0@pwslap01u.europe.root.pri> <5374.1469315162@hydra.kiddle.eu> <20160726145224.7910b718@pwslap01u.europe.root.pri> To: zsh-workers@zsh.org Subject: Re: bug with camel case and delete-whole-word-match function MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <57126.1469557325.1@hydra.kiddle.eu> Date: Tue, 26 Jul 2016 20:22:05 +0200 Message-ID: <57127.1469557325@hydra.kiddle.eu> Peter wrote: > > A similar issue occurs at the start of the line - element 1 contains > > whitespace while element 3 doesn't. > > I'm not sure what you're testing. I've put a test function below and > ran it with > > mwbs-test -w normal-subword $'one two ThreeFour ' $' \nFiveSix seven' I probably should have said start/end of the buffer rather than of the line. It is the output of the following two: mwbs-test ' ' ' word' mwbs-test 'word ' ' ' In the latter case, this is: start: '' wd-before-c: 'word' ws-before-c: ' ' ws-after-c: '' wd-after-c: '' ws-after-w: '' end: ' ' So the spaces go in end rather than ws-after-c. Whenever the cursor is between actual words, ws-before-c and ws-after-c will cover the full area of whitespace surrounding the cursor. I don't see why it should be different when you've got the end/start of the buffer. For comparison, try: mwbs-test 'word ' ' x' In vi word selection will grab a whole block of whitespace in these cases. > This should fix this in a way that makes it easy to add new features. Thanks. Looks good to me. > +If the option -A is given to tt(match-words-by-style), then Given that it is the calling functions' responsibility to declare matched_words, it could just use ${(t)matched_words} but I'm not especially bothered. Oliver