ModCommand () { if (!myPositionUpdated || myRenameSymbol != null) return nop(); int length = myTracker.myTargetFile.getTextLength(); int start = -1, end = -1, caret = -1; if (mySelection.getEndOffset() <= length) { start = mySelection.getStartOffset(); end = mySelection.getEndOffset(); } if (this.myCaretOffset <= length) { caret = this.myCaretOffset; } if (start == -1 && end == -1 && caret == -1) return nop(); return new ModNavigate(myNavigationFile, start, end, caret); }