boolean (Editor editor, HighlighterIterator iterator, int offset) { final CharSequence charsSequence = editor.getDocument().getCharsSequence(); final TextRange current = getRangeOfThisType(charsSequence, offset); final int next = locateNextPosition(charsSequence, charsSequence.charAt(offset), current.getEndOffset(), +1); return next == -1 || getRangeOfThisType(charsSequence, next).getLength() < current.getLength(); }