webpackbin
webpackbin copied to clipboard
Undo not working correctly
When switching the tab and undoing you get the code of the previous tab.
This is caused by CodeEditor's .setModeAndLinter
being asynchronous.
If modes.set
's promise is returned, then the clearHistory can be done after that.
this.setModeAndLinter().then(() => {
this.codemirror.getDoc().clearHistory()
this.focusLastCursorPosition()
})
I'll try to get a PR up for this.