private CaretStopPolicy resolveCaretStopPolicy(@MagicConstant(intValues = {BEFORE, HERE, AFTER}) int direction) {
      var caretStopOptions = EditorSettingsExternalizable.getInstance().getCaretStopOptions();
      switch (direction) {
        case AFTER -> {
          return caretStopOptions.getForwardPolicy();
        }
        case BEFORE -> {
          return caretStopOptions.getBackwardPolicy();
        }
        case HERE -> {
          return myCaretPos - myPreviousCaretPos >= 0 ? caretStopOptions.getForwardPolicy() : caretStopOptions.getBackwardPolicy();
        }
      }
      return caretStopOptions.getForwardPolicy();
    }
private CaretStopPolicy resolveCaretStopPolicy(@MagicConstant(intValues = {BEFORE, HERE, AFTER}) int direction)