Undo/Redo (Was: Re: annoyance: undo does not reset "modified" status)

Dmitry Semyonov Dmitry.Semyonov at oktet.ru
Fri Apr 11 23:57:22 UTC 2003


On Fri, 11 Apr 2003, Adam Byrtek / alpha wrote:

> My idea:
>
> 1) If there is a movement action on top of the stack: undo all
> movement actions till the last modify action (without modify action).

I would like to be able to undo Ctrl+L like jumps one by one.


> 2) If there is a modify action on top of the stack: undo all
> movement actions till the last movement action OR a newline.
  ~~~~~~~~
  modyfy?

> This way we will undo one line at the time when dealing with large
> block of text, or till the last movement, if we just corrected
> something.

This is too excessive for me. Although, it may be made optional (see
below).


My proposal.

- First of all, redo is more important feature than grouping of undo
  actions. (If it is not implemented still.)

- Additional option is required in editor preferences to turn
  _movements_ grouping on or off.

- Detailed list of actions should be always saved in memory, so that
  turning grouping off in preferences while continuing to edit the same
  file gives an expected result. I.e. grouping is performed on the stage
  of undo/redo processing, not on the stage of recording user actions.

- _Movement_ grouping is performed (if enabled) only if new cursor
  position lies on the current line, or on the nearest above or below line.
  (This allows to undo Ctrl+L or Ctrl+PgUp/Down jumps one by one).

- _Modyfy_ actions are not grouped on C-U.

- Special key combination is added for grouping _modify_ actions.
  The grouping is performed until white-space character is not reached.
  Note that Ctrl+Y, block delete, etc. operations are not grouped.
  (Another bahaviour may be selected optionally from editor
  preferences).

- Extra option should be added to allow selection of modyfy grouping
  behaviour: based on words, based on lines and movements, etc.


...Bye..Dmitry.




More information about the mc-devel mailing list