We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When double clicking "huhu_2" it only selects "huhu" instead of the whole word.
Seems to be a problem with the BreakIterator, I found a similar (solved) Issue #197
A workaround or a fix would be great! Thanks!
The text was updated successfully, but these errors were encountered:
You can workaround by overriding selectWord() with something like:
selectWord()
private final CodeArea area = new CodeArea() { @Override public void selectWord() { if ( getLength() == 0 ) return; CaretSelectionBind<?,?,?> csb = getCaretSelectionBind(); int position = csb.getPosition(); BreakIterator breakIterator = BreakIterator.getWordInstance(); breakIterator.setText( getText() ); breakIterator.preceding( position ); int start = breakIterator.current(); while ( start > 0 && "_-".indexOf( getText().charAt( start-1 ) ) > -1 ) { if ( --start > 0 && ! breakIterator.isBoundary( start-1 ) ) { breakIterator.preceding( start ); start = breakIterator.current(); } } breakIterator.following( position ); int end = breakIterator.current(); while ( end < getLength() && "_-".indexOf( getText().charAt( end ) ) > -1 ) { if ( ++end < getLength() && ! breakIterator.isBoundary( end+1 ) ) { breakIterator.following( end ); end = breakIterator.current(); } // For some reason single digits aren't picked up so .... else if ( Character.isDigit( getText().charAt( end ) ) ) { end++; } } csb.selectRange( start, end ); } };
Sorry, something went wrong.
This is now built into the latest release of CodeArea in RichTextFX 0.10.2
No branches or pull requests
When double clicking "huhu_2" it only selects "huhu" instead of the whole word.
Seems to be a problem with the BreakIterator, I found a similar (solved) Issue #197
A workaround or a fix would be great! Thanks!
The text was updated successfully, but these errors were encountered: