Re: annoyance: undo does not reset "modified" status



Hello, Adam!

> On Wed, Apr 02, 2003 at 08:01:25PM +0200, Oswald Buddenhagen wrote:
> > i often accidentally do minor modifications (mostly partial escape
> > sequences) which i undo of course. anyway, afterwards i still don't know
> > if this was the only modification.
>
> Patch attached.

Problems:

1) I need to press Ctrl-U twice to undo a single action.  The first
Ctrl-U reverts the action, the second Ctrl-U make the file unmodified.

2) If I start with movements and then change something, the file won't be
unmodified until I undo all movements.

3) If I edit a file and save it, and then keep pressing Ctrl-U, the file
will be restored to the original state (as it was opened) and will become
unmodified.  Then the editor would exit without prompting the user and
without saving the file.

I believe there should be only one stretch when the file is unmodified -
starting from the point when the file was saved the last time and ending
when the file was modified the first time after the last save.  If it's
hard to implement, I'd rather keep the existing behavior.

> BTW I'm not sure if it is wide to undo every cursor movement. IMO
> pop_action should apply EVERY movement action till the last action
> which actually modified something (including this action).

It's very convenient if I press Ctrl-PgUp and go to the beginning, and
then I use Ctrl-U to return to the original position.

We could have a separate key for the "real undo".

-- 
Regards,
Pavel Roskin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]