Just spotted a little bug in macro recording, whereby it doesn't seem to record undo operations.
1) Copy some text into your clipboard 2) Start recording, type something, paste clipboard, undo that, then stop recording 3) When you replay the macro it applies to clipboard paste but ignores the undo
Not a show stopper, but I recorded quite a big macro today and it threw me for a while
Cheers
On 22 Oct 2014, at 0:16, Carpii UK wrote:
Just spotted a little bug in macro recording, whereby it doesn't seem to record undo operations […]
Yeah, this has actually never worked (not in TextMate 1.x either). For now, if one makes a mistake while recording a macro, either start over or fix the source of the recorded macro.
The problem is that undo is context dependent so for it to work in macros, we need to unrecord the logical operations done, but the undo stack does not have that info, furthermore, we would need to also handle redo, so extra bookkeeping would be required when undoing in a macro, and we may also need to support undoing more than recorded actions, which would need to not group the entire replay of a macro as a single undoable action.
So all in all a lot of complexity, hence why it hasn’t been tackled yet…