emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vundo 81d126cfab 22/58: Fix vundo-stem-root and vundo-s


From: ELPA Syncer
Subject: [elpa] externals/vundo 81d126cfab 22/58: Fix vundo-stem-root and vundo-stem-end
Date: Fri, 15 Apr 2022 12:58:13 -0400 (EDT)

branch: externals/vundo
commit 81d126cfabb2dd91bd779015d41d7ad0ac60aa84
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    Fix vundo-stem-root and vundo-stem-end
    
    * vundo.el (vundo-stem-root): Don’t proceed if there is no parent.
    (vundo-stem-end): Don’t proceed if there is no child.
---
 vundo.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/vundo.el b/vundo.el
index 7a9d96b8f1..11df966f5e 100644
--- a/vundo.el
+++ b/vundo.el
@@ -900,8 +900,10 @@ If ARG < 0, move forward."
   "Move to the beginning of the current stem."
   (interactive)
   (vundo--check-for-command
-   (let* ((this (vundo--current-node vundo--prev-mod-list))
-          (next (vundo-m-parent this)))
+   (when-let* ((this (vundo--current-node vundo--prev-mod-list))
+               (next (vundo-m-parent this)))
+     ;; If NEXT is nil, ie, this node doesn’t have a parent, do
+     ;; nothing.
      (vundo--move-to-node
       this next vundo--orig-buffer vundo--prev-mod-list)
      (setq this next
@@ -919,8 +921,10 @@ If ARG < 0, move forward."
   "Move to the end of the current stem."
   (interactive)
   (vundo--check-for-command
-   (let* ((this (vundo--current-node vundo--prev-mod-list))
-          (next (car (vundo-m-children this))))
+   (when-let* ((this (vundo--current-node vundo--prev-mod-list))
+               (next (car (vundo-m-children this))))
+     ;; If NEXT is nil, ie, this node doesn’t have a child, do
+     ;; nothing.
      (vundo--move-to-node
       this next vundo--orig-buffer vundo--prev-mod-list)
      (setq this next



reply via email to

[Prev in Thread] Current Thread [Next in Thread]