Skip to content
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

Undo hotkey clears node text #246

Open
Firemaw opened this issue Feb 18, 2021 · 5 comments
Open

Undo hotkey clears node text #246

Firemaw opened this issue Feb 18, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@Firemaw
Copy link

Firemaw commented Feb 18, 2021

Windows 10, Yarn Spinner v0.4.124

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

@blurymind
Copy link
Owner

blurymind commented Feb 18, 2021

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

@FaultyFunctions
Copy link
Contributor

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.

@FaultyFunctions
Copy link
Contributor

FaultyFunctions commented Feb 20, 2021

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?

@Firemaw
Copy link
Author

Firemaw commented Feb 20, 2021

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).

@FaultyFunctions FaultyFunctions added the bug Something isn't working label Feb 20, 2021
@FaultyFunctions
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants