How is the undo/redo "rules" implemented ? After I do "Execute Current File", it seems the buffer is cleared.