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

Visible paragraphs' last index is [-1] but visibleParIndex was [0] #1042

Closed
fangzhongwei opened this issue Oct 2, 2021 · 2 comments
Closed

Comments

@fangzhongwei
Copy link

fangzhongwei commented Oct 2, 2021

1.Run JavaKeywordsDemo to open the "Java Keywords Demo" window.
2.Copy one line text, such as "System.err.println("Warning: empty string as argument");".
3.Press Ctrl + A to select whole text, then Press Ctrl + V to paste, got follow error.
4.It only happens when paste for the first time.

Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Visible paragraphs' last index is [-1] but visibleParIndex was [0]
at org.fxmisc.richtext.GenericStyledArea.visibleParToAllParIndex(GenericStyledArea.java:982)
at org.fxmisc.richtext.ViewActions.firstVisibleParToAllParIndex(ViewActions.java:284)
at org.fxmisc.richtext.LineNumberFactory.deleteParagraphCheck(LineNumberFactory.java:148)
at org.fxmisc.richtext.LineNumberFactory.lambda$new$1(LineNumberFactory.java:91)
at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run$$$capture(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$4(WinApplication.java:185)
at java.lang.Thread.run(Thread.java:748)

@Siedlerchr
Copy link

Yep, We encountered the same with the XML Editor highlighting JabRef/jabref#7860

@Siedlerchr
Copy link

Seems like its's already fixed in master #1021

@Jugen Jugen closed this as completed Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants