Function: majutsu-section--hidden-bounds

majutsu-section--hidden-bounds is a natively compiled function defined in majutsu-section.el.

Signature

(majutsu-section--hidden-bounds SECTION)

Documentation

Return invisible overlay bounds for SECTION as (BEG . END).

If the section body ends with a newline, keep that newline visible by shifting the invisible range one character earlier as well.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-section.el
(defun majutsu-section--hidden-bounds (section)
  "Return invisible overlay bounds for SECTION as (BEG . END).
If the section body ends with a newline, keep that newline visible by
shifting the invisible range one character earlier as well."
  (when-let* ((beg (oref section content))
              (end (oref section end))
              (_ (< beg end)))
    (if (and (> beg (oref section start))
             (eq (char-before end) ?\n))
        (cons (1- beg) (1- end))
      (cons beg end))))