public int following(int offset) { // work around too eager IAEs in standard implementation if (offset == getText().getEndIndex()) return DONE; int next= fIterator.following(offset); if (next == DONE) return DONE; // TODO deal with complex script word boundaries // Math.min(offset + run.length, next) does not work // since BreakIterator.getWordInstance considers _ as boundaries // seems to work fine, however Run run= consumeRun(offset); return offset + run.length; }
@Override public int following(int offset) { // work around too eager IAEs in standard implementation if (offset == getText().getEndIndex()) return DONE; int next= fIterator.following(offset); if (next == DONE) return DONE; // TODO deal with complex script word boundaries // Math.min(offset + run.length, next) does not work // since BreakIterator.getWordInstance considers _ as boundaries // seems to work fine, however Run run= consumeRun(offset); return offset + run.length; }
@Override public int following(int offset) { // work around too eager IAEs in standard implementation if (offset == getText().getEndIndex()) return DONE; int next= fIterator.following(offset); if (next == DONE) return DONE; // TODO deal with complex script word boundaries // Math.min(offset + run.length, next) does not work // since BreakIterator.getWordInstance considers _ as boundaries // seems to work fine, however Run run= consumeRun(offset); return offset + run.length; }