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

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

[nongnu] elpa/undo-fu 7430fa58f1 75/82: Fix unconstrained undo when the


From: ELPA Syncer
Subject: [nongnu] elpa/undo-fu 7430fa58f1 75/82: Fix unconstrained undo when the user has undo-no-redo enabled
Date: Thu, 7 Jul 2022 12:04:55 -0400 (EDT)

branch: elpa/undo-fu
commit 7430fa58f1d0eed51cb9cdc5b45dca437d3c70f3
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Fix unconstrained undo when the user has undo-no-redo enabled
    
    As this isn't the default, most users wont have this enabled,
    nevertheless - if it's enabled it should be ignored for unconstrained
    undo.
---
 changelog.rst | 1 +
 undo-fu.el    | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/changelog.rst b/changelog.rst
index 11cc3178e2..161e2be247 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -4,6 +4,7 @@ Change Log
 ##########
 
 - Version 0.5 (in development)
+  - Fix unconstrained undo when the user has ``undo-no-redo`` enabled.
   - Protect against ``aggressive-indent-mode``.
 
 - Version 0.4 (2020-05-22)
diff --git a/undo-fu.el b/undo-fu.el
index 7df2a5ad74..0da8f30e66 100644
--- a/undo-fu.el
+++ b/undo-fu.el
@@ -287,7 +287,8 @@ Optional argument ARG The number of steps to redo."
                   " (unconstrained)")
                 (if undo-fu--respect
                   (undo-fu--backport-undo-redo steps)
-                  (undo steps)))
+                  (let ((undo-no-redo nil))
+                    (undo steps))))
               t)
             (error
               (progn
@@ -376,7 +377,8 @@ Optional argument ARG the number of steps to undo."
                   ""
                   " (unconstrained)")
                 (if (or (not undo-fu--respect) undo-fu--in-region)
-                  (undo steps)
+                  (let ((undo-no-redo nil))
+                    (undo steps))
                   (undo-only steps)))
               t)
             (error



reply via email to

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