-
Notifications
You must be signed in to change notification settings - Fork 236
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
Question: CTRL-Z Behavior with highlighted text #765
Comments
I'm surprised it isn't compatible since it's a subclass of I'll have to look into it more later this week. |
I'll double-double check, it may just be weird Eclipse shenanigans. It's happened to me before. (I.E. I'll clean the project and etc to make sure it's nothing weird). I'll report back when I do. |
Ah, figured it out. The issue is that the change type should be So, the code is actually: UndoManager<List<PlainTextChange>> um = UndoUtils.plainTextUndoManager(textArea);
textArea.setUndoManager(um); After that, it stopped undoing the syntax highlighting. |
Confirmed it working on my end too! Thanks a lot! |
Regarding the issue-starter's comment:
I'd like to point out, I ran into the undo-highlight issue in But changing the undo-manager did the job. Thank you for the recipe! |
When using InlineCssTextArea, when you style individual parts of the text and highlight them, then try to use CTRL-Z functionality, it'll undo the highlighting rather than undo the text changes you entered.
A potential fix was mentioned in #761:
The problem now is that it doesn't appear that InlineCssTextArea is compatible with it. I'm assuming there's an alternative version that is? Or some sort of work around would be appreciated. I'd rather not use StyleClassedTextArea in this case because it'd complicate how my project works a bit, but if I need to, I can probably make the change at some point. I just want to make there's not an easier workaround first.
Reproducible test software:
The text was updated successfully, but these errors were encountered: