From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26499 invoked from network); 4 May 2008 17:52:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 4 May 2008 17:52:46 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 12108 invoked from network); 4 May 2008 17:52:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 May 2008 17:52:38 -0000 Received: (qmail 29337 invoked by alias); 4 May 2008 17:52:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24913 Received: (qmail 29318 invoked from network); 4 May 2008 17:52:33 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 4 May 2008 17:52:33 -0000 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by bifrost.dotsrc.org (Postfix) with ESMTP id 0159F80ED172 for ; Sun, 4 May 2008 19:52:27 +0200 (CEST) Received: by rv-out-0506.google.com with SMTP id g37so1248645rvb.21 for ; Sun, 04 May 2008 10:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=c5SOW/1x1/F5BKUh48mhycOdL48+CGizD/iyclLG79Q=; b=K3cXMtsaOtFoahWiw41Ta6UnYEW6xzqr/fpBLYgWhfiexIc+gPkk/51AVyHVMW/HagyEcyDltFhfejkXYrqn/g6oVZELiFxPvdLXLIpzIYjPU4DI+s3YT3bpFOYtac71+03K1bZgnQ37vMDaqUP5naBM7BpmJf6OFxe4QUhehAg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pF1mmrfA1IuBYTBBjd0P3UwPYy8XgnjcDhDppOoNNIWYbVPj+ZL0JHLzeyBSrM7aPTmx2dZ8NcW+i63w1JTXDx13qDhLY24szmMKiqHrA9gnTQgCLBR1uveyKpw46cLxb4nPTPn7Ys4SfK9tDqsJjJTqffcRjqKSTfXYzjh1xfE= Received: by 10.141.27.16 with SMTP id e16mr2389728rvj.259.1209923546924; Sun, 04 May 2008 10:52:26 -0700 (PDT) Received: by 10.140.127.7 with HTTP; Sun, 4 May 2008 10:52:26 -0700 (PDT) Message-ID: <237967ef0805041052t48db33adk21984064be68c0a2@mail.gmail.com> Date: Sun, 4 May 2008 19:52:26 +0200 From: "Mikael Magnusson" To: zsh-workers@sunsite.dk Subject: Re: Identify "active" region? In-Reply-To: <080504093852.ZM3575@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <080503175219.ZM11801@torch.brasslantern.com> <20080504132102.076669ed@pws-pc> <237967ef0805040533x699fcf37p2ea24d2abe38d3df@mail.gmail.com> <237967ef0805040535y2f4343eds5b42adf9bc3075a6@mail.gmail.com> <080504093852.ZM3575@torch.brasslantern.com> X-Virus-Scanned: ClamAV 0.91.2/7022/Sun May 4 16:23:46 2008 on bifrost X-Virus-Status: Clean 2008/5/4 Bart Schaefer : > On May 4, 2:35pm, Mikael Magnusson wrote: > } > } I realize two things just after hitting send, 1) the variable should > } probably be called something like REGIONACTIVE, and 2) I didn't write > } any documentation for it. > > Or it could be slightly more complicated and be an associative array > with fields active, start, and end. Then one could write > > (( $REGION[active] )) && BUFFER[$REGION[start],$REGION[end]]=... > > instead of > > if (( $REGIONACTIVE )) > then > integer start=$MARK end=$CURSOR > if (( MARK > CURSOR )) > start=$CURSOR > end=$MARK > fi > BUFFER[$start,$end]=... > fi > > However, $REGIONACTIVE is much better than nothing; thanks. Hm, that might be nicer. But I see there are no zle variables that are associative arrays, so I don't really know how to do that. (Actually the two that are normal arrays look a bit scary too :). -- Mikael Magnusson