Function: vundo-forward
vundo-forward is an interactive and natively compiled function defined
in vundo.el.
Signature
(vundo-forward ARG)
Documentation
Move forward ARG nodes in the undo tree.
If ARG < 0, move backward.
Key Bindings
vundo-mode-map <right> vundo-mode-map f
Source Code
;; Defined in /nix/store/386w2ds6bdh3gcz9k23jssw4cni4lfr2-emacs-packages-deps/share/emacs/site-lisp/elpa/vundo-2.4.0/vundo.el
(defun vundo-forward (arg)
"Move forward ARG nodes in the undo tree.
If ARG < 0, move backward."
(interactive "p")
(vundo--check-for-command
(let ((step (abs arg)))
(let* ((source (vundo--current-node vundo--prev-mod-list))
dest
(this source)
(next (if (> arg 0)
(car (vundo-m-children this))
(vundo-m-parent this))))
;; Move to the dest node step-by-step, stop when no further
;; node to go to.
(while (and next (> step 0))
(setq this next
next (if (> arg 0)
(car (vundo-m-children this))
(vundo-m-parent this)))
(cl-decf step))
(setq dest this)
(unless (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)
;; Refresh display.
(vundo--refresh-buffer
vundo--orig-buffer (current-buffer) 'incremental))))
(run-hook-with-args 'vundo-after-undo-functions vundo--orig-buffer)))