Function: diff-hl-update
diff-hl-update is a natively compiled function defined in diff-hl.el.
Signature
(diff-hl-update)
Documentation
Updates the diff-hl overlay.
Source Code
;; Defined in /nix/store/cfz56rl3lp066226i0bmmgiicls3gcq7-emacs-packages-deps/share/emacs/site-lisp/elpa/diff-hl-20261001.135/diff-hl.el
(defun diff-hl-update ()
"Updates the diff-hl overlay."
(setq diff-hl-timer nil)
(if (and (diff-hl--use-async-p)
(eq diff-hl-update-async 'thread))
;; TODO: debounce if a thread is already running.
(let ((buf (current-buffer))
(temp-buffer
(static-if (< emacs-major-version 28)
(generate-new-buffer " *temp*")
(generate-new-buffer " *temp*" t))))
;; Switch buffer temporarily, to "unlock" it for other threads.
(with-current-buffer temp-buffer
(make-thread
(lambda ()
(kill-buffer temp-buffer)
(when (buffer-live-p buf)
(set-buffer buf)
(diff-hl--update-safe)))
"diff-hl--update-safe")))
(diff-hl--update)))