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
This 'clear' action on ctrl + z still happens, but at least on 0.2.1 ctrl + y puts the text back.
From what I can tell in the debugger the bit that's causing this to happen is ace.js undoChanges function. It calculates a delta of changes and if I understand it correctly, the act of loading a node into the ace editor causes a delta state of "it was empty, then I had a bunch of text". The wierd set of tabs and spaces you get are the result of the tabs inside the index.html <div class="editor" id="editor" .... >{tab and spaces}</div> which ace considers the initial state to fall back to. If you remove those spaces, or populate the empty space with your own text, you can see that when the undo delta triggers you get whatver was between the open and closing tags.
That's great, that's the problem identified.
I have no idea how ace works though, so I'm not sure how to fix this. Does anyone have any suggestions on how we could interrupt the ace undo method if we're at the first local change which was "load node text into editor" ? I though the ctrl+z stuff in app.js updateHighlights may have been what was supposed to be doing this, but it seems that block of code is never actually called, at least that I've seen as yet.
Test case :
Before hitting CTRL+Z
After hitting CTRL+Z
The text was updated successfully, but these errors were encountered: