You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that we can edit multiple files, we should retain a separate undo stack for each file that has been edited.
The Ace Editor EditSession provides methods to get and set the UndoManager
From this we could manage a mapping: file path --> current UndoManager within editor.js
When the current file is changed, save the current and load the new UndoManager into the EditSession
Whenever a file's contents are manipulated via the VM or deleted, simply remove its UndoManager from the dictionary.
The text was updated successfully, but these errors were encountered:
From this we could manage a mapping: file path --> current UndoManager
within editor.js
When the current file is changed, save the current and load the new
UndoManager into the EditSession
Whenever a file's contents are manipulated via the VM or deleted,
simply remove its UndoManager from the dictionary.
Some corner cases to consider-
And if a file is externally deleted?
And if a file is renamed to be the same as existing file (and then opened)
And if another file is renamed to be the one currently open in the editor
(there may be more - that's all that come to mind)
Now that we can edit multiple files, we should retain a separate undo stack for each file that has been edited.
The Ace Editor EditSession provides methods to get and set the UndoManager
From this we could manage a mapping: file path --> current UndoManager within editor.js
When the current file is changed, save the current and load the new UndoManager into the EditSession
Whenever a file's contents are manipulated via the VM or deleted, simply remove its UndoManager from the dictionary.
The text was updated successfully, but these errors were encountered: