Some undo for text editor editors handle text input differently.

  • Every key press is a single undo step.
    Typing in a word N characters long, requires N undo steps.
  • Undo steps use word boundaries
    Undoing will undo each word entered.
  • Undo steps use timer-based boundaries
    If you stop typing N milliseconds - this adds an undo step.
  • Undo steps add boundaries every N characters entered.

Given these different ways of handling undo for text input, are there strong reasons to pick one of these over another?

Edit, asking about this for text entry fields for a widget-toolkit.


Definitely. There are several reasons you might want to pick one over another.

For instance, if my inputs require a large number of characters, not case-sensitive or no strict adherence to pre-defined rules, I might most likely do with a time-based boundary undo step.

If I am inputting case sensitive characters, I might most definitely go for any other way rather than the above. The undo type I would now employ may now be dependent on some other factors like, how long each word is, how much attention to details do I really need etc.

It totally would be dependent on the general use of what the inputs are for.

  • The inputs are for a widget toolkit text entry fields, so it's quite general.
    – ideasman42
    Nov 27 '19 at 12:17
  • Implying there are no strict rules as to entering text. You could go with anyone then. But most preferably using word boundaries. Easier to undo words multiple times than sentences once or characters multiple times.
    – Wurah
    Nov 27 '19 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.