docs: private static int[] getViewToHeaderPositionImpl(JTextArea view, int start, int end) {
          int finalStartPos = start;
          try {
              finalStartPos += view.getLineOfOffset(finalStartPos);
          } catch (BadLocationException e) {
              // Shouldn't happen, position was already validated.
              LOGGER.error(e.getMessage(), e);
              return INVALID_POSITION;
          }
  
          int finalEndPos = end;
          try {
              finalEndPos += view.getLineOfOffset(finalEndPos);
          } catch (BadLocationException e) {
              // Shouldn't happen, position was already validated.
              LOGGER.error(e.getMessage(), e);
              return INVALID_POSITION;
          }
          return new int[] { finalStartPos, finalEndPos };
      }