From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21808 invoked by alias); 9 Jul 2015 18:33:07 -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: 35755 Received: (qmail 17545 invoked from network); 9 Jul 2015 18:33:04 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=UKUgZ3ry c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=BrDiTsk0AAAA:8 a=qGjusAKGgA-8VlEvzvEA:9 a=VLBCSg568dOzSs-L:21 a=98TNkCUVDfM6LZyY:21 a=CjuIK1q_8ugA:10 Date: Thu, 9 Jul 2015 19:32:55 +0100 From: Peter Stephenson To: Zsh workers Subject: Re: Undo is also confused with narrow-to-region Message-ID: <20150709193255.31e8e4da@ntlworld.com> In-Reply-To: <17928.1436367453@thecus.kiddle.eu> References: <8242.1435937191@thecus.kiddle.eu> <20150706093957.33d9cb25@pwslap01u.europe.root.pri> <4900.1436183185@thecus.kiddle.eu> <20150706202554.02d6c73a@ntlworld.com> <17928.1436367453@thecus.kiddle.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 08 Jul 2015 16:57:33 +0200 Oliver Kiddle wrote: > Peter wrote: > > > > The example I've given shows an explicit save and restore. It should > > also be possible to use the double function scope trick, though I didn't > > actually try. > > > > I haven't imposed any arbitrary limits on the value in UNDO_LIMIT_NO as, > > on thinking about it, it seemed to create hostages to fortune for no > > obvious gain. > > Thanks. Trying to apply this in read-from-minibuffer, I found that it > was necessary to add a split-undo in after the BUFFER etc were setup, > otherwise it was possible to do one initial undo. Also, I wonder if the > if condition should do a return 1 rather than break so that it beeps - > consistently with an undo that has reached the very first change. Or is > the setlastline() call needed? Finally committed. I don't see that you'd need setlastline() if you tried a single undo interactively and it failed, so it ought to be OK to return 1. pws