You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After copying a newline operator that directly follows a line of text that is completely styled, there should not be an exception when undoing that copy & paste.
Actual Behavior
The following exception appears:
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Unexpected change received.
Expected:
[RichTextChange{
position: 59
removed: Par[; StyledSegment(segment=left() style=true,12,Serif,0x000000ff)]
Par[; StyledSegment(segment=left(this is the copied line) style=12,Serif,0x000000ff)]
inserted: Par[; StyledSegment(segment=left() style=12,Serif,0x000000ff)]
}]
Received:
[RichTextChange{
position: 59
removed: Par[; StyledSegment(segment=left() style=12,Serif,0x000000ff)]
Par[; StyledSegment(segment=left(this is the copied line) style=12,Serif,0x000000ff)]
inserted: Par[; StyledSegment(segment=left() style=12,Serif,0x000000ff)]
}]
at org.fxmisc.undo.impl.UndoManagerImpl.changeObserved(UndoManagerImpl.java:234)
at org.reactfx.util.QueuingStreamNotifications.lambda$head$0(NotificationAccumulator.java:217)
at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68)
at org.reactfx.SuspendableBase.resume(SuspendableBase.java:64)
at org.reactfx.CloseableOnceGuard.close(Guard.java:49)
at org.reactfx.MultiGuard.close(Guard.java:83)
...
After this exception, all input to the text area is broken. It is not even possible anymore to move the caret.
Steps To Reproduce
Run the RichTextDemo example
Add two lines
The first line should be styled in its entirety
The second line's styling seems to be irrelevant (based on my testing)
Copy the second line along with the preceding newline (so that the selection looks like this:
Paste the clipboard contents after the second line
Hit CTRL + Z to undo
Let me know if I was unclear in some step. I was able to consistently reproduce this in both my own repository and the RichTextDemo. As far as I can see, #903 is unrelated to this issue, though I could be wrong about that.
The text was updated successfully, but these errors were encountered:
It appears that this bug was introduced way back in v0.8.0 with PR #565 to resolve issue #554.
Reverting that change resolves the case outlined above, unfortunately there's no test case for 565 .... ?
Will continue to look into it and try to develop test cases ..... but the undo manager's merge changes timeout is a problem in accomplishing that.
Expected Behavior
After copying a newline operator that directly follows a line of text that is completely styled, there should not be an exception when undoing that copy & paste.
Actual Behavior
The following exception appears:
After this exception, all input to the text area is broken. It is not even possible anymore to move the caret.
Steps To Reproduce
Let me know if I was unclear in some step. I was able to consistently reproduce this in both my own repository and the RichTextDemo. As far as I can see, #903 is unrelated to this issue, though I could be wrong about that.
The text was updated successfully, but these errors were encountered: