nuprl/Ocelot

Implement proper undo for editor

Closed this issue · 4 comments

Current bug is editor undo 'stack' is cleared every time new code is loaded (i.e. user selects a new file). I want editor to preserve the undo stack for each individual file. The solution is to implement 'faux' Tabs (basically hidden file tabs, not really tabs but function as them behind the scenes).

Reference: Monaco Editor Issue 604

Fixed with 264c444?

This is actually a different bug/enhancement, I want users to be able to undo even after switching to different files. Right now, once the user selects a different file, the undo stack gets cleared and when the user selects the previous file they had opened, they can't undo anymore.

Rather than thinking it preserves the undo stack for files, it's more like an alternative to tabs.
Since we don't support tabs, we can preserve the edits for some number of most recently opened files.