From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5985 invoked by alias); 9 Oct 2012 15:24:43 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17316 Received: (qmail 16402 invoked from network); 9 Oct 2012 15:24:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) 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 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <121009082425.ZM29621@torch.brasslantern.com> Date: Tue, 09 Oct 2012 08:24:25 -0700 In-reply-to: Comments: In reply to Peter Stephenson "Re: bug in replace-string: widget loses characters" (Oct 9, 3:34pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: bug in replace-string: widget loses characters MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 9, 3:34pm, Peter Stephenson wrote: } } The one side effect is that $UNDO_CHANGE_NO is different each time it's } read. I could fix that if anyone cared, but if it helped you could sort } of look on it as a feature: you are guaranteed that all recorded change } points are unique and monotonically increasing whether or not the line } itself was changed. I think this is OK, but I suppose there might be a case where one wanted to be able to detect whether any changes had occurred between state X and state Y, e.g. previously local current_undo=$UNDO_CHANGE_NO # ... some stuff potentially happens ... if (( current_undo == UNDO_CHANGE_NO )) then # nothing happened? fi Is there another way to detect this? It's probably not a common thing to care about so perhaps not worth a lot of effort.