branch: externals/transient
commit e77d16dd02c035902849b9f892ea998542ac17c2
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    transient--post-command: Avoid needlessly recreating redisplay map
    
    This keymap is first created when the transient prefix command is
    invoked and there is no need to recreate it once that command is
    done because nothing relevant has changed by that time.
---
 lisp/transient.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 1b27637b67..04ff934b0f 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2056,10 +2056,10 @@ value.  Otherwise return CHILDREN as is."
           (run-hooks 'transient-exit-hook)
           (when resume
             (transient--stack-pop))))
-    (transient--pop-keymap 'transient--redisplay-map)
-    (setq transient--redisplay-map (transient--make-redisplay-map))
-    (transient--push-keymap 'transient--redisplay-map)
     (unless (eq this-command (oref transient--prefix command))
+      (transient--pop-keymap 'transient--redisplay-map)
+      (setq transient--redisplay-map (transient--make-redisplay-map))
+      (transient--push-keymap 'transient--redisplay-map)
       (transient--redisplay))))
 
 (defun transient--stack-push ()

Reply via email to