Function: indent-bars--window-change
indent-bars--window-change is a natively compiled function defined in
indent-bars.el.
Signature
(indent-bars--window-change &optional WIN)
Documentation
Update the stipples for buffer in window WIN.
WIN defaults to the selected window. To be set as a local
window-state-change-functions hook.
Source Code
;; Defined in /nix/store/zkcdcnmcj3605fj09x584bf58d85brax-emacs-packages-deps/share/emacs/site-lisp/elpa/indent-bars-1.0.1/indent-bars.el
(defun indent-bars--window-change (&optional win)
"Update the stipples for buffer in window WIN.
WIN defaults to the selected window. To be set as a local
`window-state-change-functions' hook."
(unless win (setq win (selected-window)))
(let* ((w (indent-bars--window-font-space-width win))
(h (window-font-height win))
(rot (indent-bars--stipple-rot win w))
(whr (indent-bars--whr w h rot))
(cur-whr (window-parameter win 'indent-bars-whr)))
(unless (eq cur-whr whr)
(set-window-parameter win 'indent-bars-whr whr))
(when-let* ((buf (window-buffer win))
(ht (buffer-local-value 'indent-bars--stipple-remaps buf))
((null (gethash whr ht))))
(with-current-buffer buf ; we may be called from an arbitrary buffer
(indent-bars--create-stipple-remaps w h rot)
(indent-bars--schedule-remap-cleanup)))))