-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] CTRL+Z clears a node's contents #37
Comments
Comment by rcuddy 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 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. |
- Now you can type a bunch of stuff in one node, then type a bunch of stuff in another node, and then go back to the first node and press Ctrl+Z. It won't delete the entire content of the node anymore, it'll undo just like if you have just typed the text.
- Now you can type a bunch of stuff in one node, then type a bunch of stuff in another node, and then go back to the first node and press Ctrl+Z. It won't delete the entire content of the node anymore, it'll undo just like if you have just typed the text.
Issue by renaudbedard
Monday Aug 22, 2016 at 15:07 GMT
Originally opened as InfiniteAmmoInc/Yarn#37
Test case :
Before hitting CTRL+Z
After hitting CTRL+Z
The text was updated successfully, but these errors were encountered: