Function: dired-narrow--live-update

dired-narrow--live-update is a natively compiled function defined in dired-narrow.el.

Signature

(dired-narrow--live-update)

Documentation

Update the dired buffer based on the contents of the minibuffer.

Source Code

;; Defined in /nix/store/xm3gi4y4qlmhgrb87qrgpns677w7ls45-emacs-packages-deps/share/emacs/site-lisp/elpa/dired-narrow-20250511.2303/dired-narrow.el
(defun dired-narrow--live-update ()
  "Update the dired buffer based on the contents of the minibuffer."
  (when dired-narrow-buffer
    (let ((current-filter (minibuffer-contents-no-properties))
          visible-files-cnt)
      (with-current-buffer dired-narrow-buffer
        (setq visible-files-cnt
              (unless (equal current-filter dired-narrow--minibuffer-content)
                (dired-narrow--update current-filter)))

        (setq dired-narrow--minibuffer-content current-filter)
        (setq dired-narrow--current-file (dired-utils-get-filename))
        (set-window-point (get-buffer-window (current-buffer)) (point))

        (when (and dired-narrow-exit-when-one-left
                   visible-files-cnt
                   (= visible-files-cnt 1))
          (when dired-narrow-enable-blinking
              (dired-narrow--blink-current-file))
          (exit-minibuffer))))))