Function: kview:get-cells-status

kview:get-cells-status is a byte-compiled function defined in kview.el.

Signature

(kview:get-cells-status KVIEW START END)

Documentation

In current buffer's KVIEW, return a coded list of status of each visible cell.

Return the list between START and END.

Status is returned as: 0 if all the lines of the cell are visible and it has no hidden branches; a positive count of the lines displayed in the cell if it has no hidden branches; otherwise, a negative count of the lines displayed, since it has hidden branches.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kview.el
(defun kview:get-cells-status (kview start end)
  "In current buffer's KVIEW, return a coded list of status of each visible cell.
Return the list between START and END.

Status is returned as: 0 if all the lines of the cell are visible and
it has no hidden branches; a positive count of the lines displayed in
the cell if it has no hidden branches; otherwise, a negative count of
the lines displayed, since it has hidden branches."
  ;; Process only visible cells and note when one contains invisible
  ;; subcells, indicating its branches are hidden.
  (kview:map-region
   (lambda ()
     (cond ((kcell-view:next-invisible-p (point) kview-label-sep-len)
	    ;; Skip to end of this subtree
	    (prog1 (- (kcell-view:lines-visible))
	      (goto-char (kotl-mode:tree-end t))))
	   ((kcell-view:collapsed-p (point) kview-label-sep-len)
	    (kcell-view:lines-visible))
	   (t 0)))
   kview t start end))