private boolean shouldStayInsideVariable(TextRange varRange, int caretOffset) {
    return varRange.containsOffset(caretOffset) &&
           caretOffset != (myIsHomeHandler ? varRange.getStartOffset() : varRange.getEndOffset());
  }
private boolean shouldStayInsideVariable(TextRange varRange, int caretOffset)