From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18137 invoked by alias); 17 Sep 2016 07:44:01 -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: 39373 Received: (qmail 17687 invoked from network); 17 Sep 2016 07:44:01 -0000 X-Qmail-Scanner-Diagnostics: from out2-smtp.messagingengine.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(66.111.4.26):SA:0(0.0/5.0):. Processed in 0.380786 secs); 17 Sep 2016 07:44:01 -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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=FNKF9SRhZOLHWK61649XYU4/A7g=; b=MCLfRF rg/nwR3CQXalzpAj6O2y5Uliqhyns3f/RA9/Z9VRwdsLB53nlIR6YNXCR6ONfIdz 6Ja+QxqJYNB0QGbmtYBD7k0W2nqAVLJWMXoSQyO4DIrazmwj5rlNwiHAE4PCGyZ6 2THqQ2UDNaeHCSEV7FQ44Ma8uuJPnBvP2bbhg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=FNKF9SRhZOLHWK61649XYU4/A7g=; b=mz+RU YfaSAJCYrNzqqU4bL5odWHae5hU9dHQTC02uVky3jYpDVzesTrmOPpHqhAl7Mfjw WI7XC/DjFiDn8Jt4WF8xSGr2T2CgDUO2dgeebZa95R8Xl9SQ+/lyDWfLyw/25vh7 ko3umd9peFO739KrnKmhhX+Uty44v5K6FN6qw8= X-Sasl-enc: /04TQufqTNcT9kW2GanC50TCl1cSkavpp9Lu4b53eCgF 1474098236 Date: Sat, 17 Sep 2016 07:42:59 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: Off-by-one with select-*-shell-word text object? Message-ID: <20160917074259.GA26221@fujitsu.shahaf.local2> References: <160916102137.ZM11290@torch.brasslantern.com> <76020.1474058827@hydra.kiddle.eu> <160916142248.ZM26196@torch.brasslantern.com> <10734.1474068633@hydra.kiddle.eu> <160916200205.ZM27241@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <160916200205.ZM27241@torch.brasslantern.com> User-Agent: Mutt/1.5.23 (2014-03-12) Bart Schaefer wrote on Fri, Sep 16, 2016 at 20:02:05 -0700: > On Sep 17, 1:30am, Oliver Kiddle wrote: > } run-help, which-command and zap-to-char suffer from the same > } issue as the text object widgets: they use bindk to select their > } behaviour. > } > } So any thoughts on this solution? > > I'd probably write it as an assignment of setbindk rather than put the > whole expression in the execzlefunc argument, but otherwise this seems > sensible on the face of it. I think it would be cleaner to invent a new bitmask flag and set it on the affected widgets (select-*-word, run-help, etc) than to overload WIDGET_INT for this purpose. Whether a widget is implemented in C or in shell has no bearing on whether it assumes that $WIDGET points to itself. Cheers, Daniel