this was intentional so when you undo, you dont need to undo one letter at a time. but i agree that in terms of ui, it should show what’s currently beeing written. this suggestion belongs more to #hopscotch-language-evolution than #hopscotch-bugs
I do think it should save in that case when you exit the code window — I will make a new topic.
Longer-term, we were thinking that it might be nice to be able to expand to a full screen text box to edit, rather than the small box above the keyboard. The current behaviour would make sense for this, but I agree it can be a bit confusing at the moment.