-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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 / Redo and external editing of input text #1506
Comments
Hello, Also browse the issues with the same flag because it has been discussed at least once here. |
Ok. Thanks. I also though about maybe calling PushID with the current undo stack size. |
That’s an original solution! I hadn’t thought about it, it might work just as well.
|
I've created a pull request with a new flag to disable undo. #1508 |
I've merged your PR with tweaks and an additional, however this issue isn't fully resolved as we ought to provide a more obvious way to allow for an external undo stack to be applied on text fields, other than using PushId or ClearActiveId. Preserving cursor/selection may be a bit tricky there. |
I ought to clarify: in my previous game engine, CTRL-Z/Y was left to the active input text, and only passed to the engine undo stack based on the |
That would work but my undo behaviour is a bit different from what is implemented in the text input. Undoing doesn't delete text letter by letter but instead revert to the state when the text input got focused (this is the behavour in most editors). I do this by tracking if the text is active and then store the current value once it becomes active. |
Hi,
I've an issue with text editing. In my editor, I have my own implementation of undo / redo.
I've managed to disable undo / redo feature in text input by modifying the code (couldn't find a flag)
The issue is that the value returns to its current value after undoing if the text input is active (since the text input stores a cache of the passed values). Is there a way to invalidate the cache while the text input is active?
Thanks
The text was updated successfully, but these errors were encountered: