Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug in replace-string: widget loses characters
- X-seq: zsh-users 17316
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: bug in replace-string: widget loses characters
- Date: Tue, 09 Oct 2012 08:24:25 -0700
- In-reply-to: <CAECNH1RZuE0yh=bT2uVfUzQC0XtOy2abtbbihDCg3K0RDj8kcw@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CANPayMTaAjtWV6=CE1rAuMhbZX=igKtBwNBLysPBq-W+G_GJYQ@mail.gmail.com> <CAECNH1TwZO8ZMZE2jB4G7e03yTA+qXbtKioWKK8xzH4n-9OucA@mail.gmail.com> <CAECNH1RZuE0yh=bT2uVfUzQC0XtOy2abtbbihDCg3K0RDj8kcw@mail.gmail.com>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author