@Override
  public int getScopeEndingAt(@NotNull Editor editor, int offset) {
    int caretShift = checkOrRemoveScopeEndingAt(editor, offset, false);
    return caretShift > 0 ? offset + caretShift : -1;
  }
@Override
  public int getScopeEndingAt(@NotNull Editor editor, int offset)