Function: vundo-next
vundo-next is an interactive and natively compiled function defined in
vundo.el.
Signature
(vundo-next ARG)
Documentation
Move to node below the current one. Move ARG steps.
Key Bindings
vundo-mode-map <down> vundo-mode-map n
Source Code
;; Defined in /nix/store/386w2ds6bdh3gcz9k23jssw4cni4lfr2-emacs-packages-deps/share/emacs/site-lisp/elpa/vundo-2.4.0/vundo.el
(defun vundo-next (arg)
"Move to node below the current one. Move ARG steps."
(interactive "p")
(vundo--check-for-command
(let* ((source (vundo--current-node vundo--prev-mod-list))
(parent (vundo-m-parent source)))
;; Move to next/previous sibling.
(when parent
(let* ((siblings (vundo-m-children parent))
(idx (seq-position siblings source))
;; If ARG is larger than the number of siblings,
;; move as far as possible (to the end).
(new-idx (max 0 (min (+ idx arg)
(1- (length siblings)))))
(dest (nth new-idx siblings)))
(when (not (eq source dest))
(vundo--move-to-node
source dest vundo--orig-buffer vundo--prev-mod-list)
(vundo--trim-undo-list
vundo--orig-buffer dest vundo--prev-mod-list)
(vundo--refresh-buffer
vundo--orig-buffer (current-buffer)
'incremental)))))
(run-hook-with-args 'vundo-after-undo-functions vundo--orig-buffer)))