When you hit Ctrl+Z, the number of inputs you've entered that are undone seems pretty random.
In the latest example that brought me here, I was converting regular lines into a blockquote in this question,1 and had done about 20 of them by this method:
- Type two spaces
- Hit ↓ and End
- Hit Ctrl+V
- Repeat steps 2 & 3
I accidentally forgot to hit End in a line, pasted in the wrong place, hit Ctrl+Z, and all of the double spaces were removed up to the start of the blockquote. Argh!
But there are many such instances. As a case in point, I just wrote the first sentence of this paragraph, hit Ctrl+Z, and the whole line was removed. But if I select a random word in this paragraph and type another in its place, and then hit Ctrl+Z, only that one word is reverted to what it was. The problem is that when behaviour is unpredictable, users avoid the function. That's what I do whenever I consciously think to myself, "Oh, right, I'm using the SE editor. There is no reliable undo."
I know this isn't unique to Stack Exchange — Word also tries and sometimes fails to guess a more "natural" delimiter of your sequence of inputs — but I find it particularly bad here.
So why is it like it is, and should it be changed to a more standard algorithm?
1 Unrelated, but entering this link reminded me that on SE, unlike every other site and word processor, adding a link is Ctrl+L instead of Ctrl+K, because the latter is used for code insertion...
<textarea>
elements)? Are you looking for a technical discussion as to how it operates to explain "Why is the SE editor's undo function so unpredictable?" Are you looking for one or more of at least a few different workarounds which disable SE's undo/redo feature? For opinions as to if people like it or not and if they would prefer the native operation?