blurymind / YarnClassic

A tool for writing interactive dialogue in games!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undo hotkey clears node text

Firemaw opened this issue · comments

Windows 10, Yarn Spinner v0.4.124

Open a filled node and press Ctrl+Z - it clears all text out.

ah interesting - I thought we had that fixed. Maybe broke again along the way?
https://github.com/YarnSpinnerTool/YarnEditor/pull/238
@FaultyFunctions

This is only fixed if you enter text into a node and close and reopen the node during that session.. If you open a new session the clear text behavior still exists since YarnEditor isn't saving the Ace UndoManager so it doesn't persist between sessions. It's only stored in internal memory for that session.

We'd need to implement some way of saving the data in between sessions to truly save undo history between sessions. With JSON that should be no problem, but the Yarn file might be a bit trickier to save an object like that.

Perhaps the behavior should be Ctrl+Z shouldn't do anything if there is no edit history, instead of just clearing the entire node? At least for the time being until edit history is implemented to persist between sessions?

Perhaps the behavior should be Ctrl+Z shouldn't do anything if there is no edit history, instead of just clearing the entire node? At least for the time being until edit history is implemented to persist between sessions?

I agree, if there is no edit history in the node, I expect Ctrl+Z to do nothing. To be honest I wouldn't expect Ctrl+Z to persist between sessions, no other apps I know of do that (if you are talking about closing and restarting the app).

Yeah I was thinking about that too. It might be nice but def not needed. Not sure how many people would use it to be honest. Let's just stick with having Ctrl + Z not do anything if there is no history for now. I don't think we'd need to implement undo history persistence between sessions, but that can be a discussion for a different day.