What is the correct approach to 'undoing' Cursor suggested and manual edits?

I’ve spent a few hours trying to get some code working and failed.

During the process, i accepted several Cursor edits and made my own.

When I press ‘Ctrl’ + ‘Z’ repeatedly to undo as far back as it goes, the code seems to get jumbled and the red/green diffs show and then disappear as I keep pressing ‘Ctrl’ + ‘Z’.

(I think the behavior with the diffs only happens when Composer is still open, either docked or floating, otherwise I think it behaves in a more predictable/standard way).

When I get back to the end of the ‘Ctrl’ + ‘Z’ history, the code is jumbled and I am assuming that it is because it is trying to undo lots of complicated handling that has been done by Cursor and the AI suggestions.

I fully accept responsibility for my frantic, frustration filled, coding frenzy, and, as someone who works in IT, I am aware that users being too ‘rough’ with computer software often ‘confuses’ it and results in undesired behaviour.

But I would be interested to know if there is a correct protocol for ‘undoing’ applied Cursor suggested and manual edits?

Because there does seem to be something in the way that I am doing things which makes the standard ‘Ctrl’ + ‘Z’ approach not work properly.

2 Likes