Function: dirvish--render-attrs

dirvish--render-attrs is a natively compiled function defined in dirvish.el.

Signature

(dirvish--render-attrs WINDOW &optional SELECTED)

Documentation

Render attributes in WINDOW, SELECTED defaults to frame-selected-window.

Source Code

;; Defined in /nix/store/1gijwny2yx4fggrsb9l110h1ybs1gdk5-emacs-packages-deps/share/emacs/site-lisp/elpa/dirvish-20260725.1520/dirvish.el
(defun dirvish--render-attrs (window &optional selected)
  "Render attributes in WINDOW, SELECTED defaults to `frame-selected-window'."
  (setq selected (or selected (frame-selected-window)))
  (with-selected-window window
    (cl-loop with attrs = (dirvish-prop :attrs) unless attrs do (cl-return)
             with ww = (window-width) and pm = (point-min) and pM = (point-max)
             with rmt = (and (dirvish-prop :remote) (not (dirvish-prop :sudo)))
             with fns = () with height = (frame-height) with gui = nil
             with hl = (and (dirvish--apply-hiding-p dirvish-hide-cursor)
                            (if (eq selected window)
                                'dirvish-hl-line 'dirvish-hl-line-inactive))
             with remain = (- ww (if (setq gui (dirvish-prop :gui)) 1 2))
             for (_ width _ pred setup render) in attrs
             when (eval pred `((win-width . ,remain)))
             do (eval setup) (setq remain (- remain width)) (push render fns)
             initially (dolist (ov '(dirvish-a-ov dirvish-l-ov dirvish-r-ov))
                         (remove-overlays pm pM ov t))
             finally (with-silent-modifications
                       (save-excursion
                         (dirvish--render-attrs-1
                          height remain (point) rmt fns (if gui 0 2) hl ww))))))