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

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

[elpa] externals/vertico 3835ce490f: vertico-repeat: Add candidates with


From: ELPA Syncer
Subject: [elpa] externals/vertico 3835ce490f: vertico-repeat: Add candidates without properties to history
Date: Wed, 8 Jun 2022 15:58:17 -0400 (EDT)

branch: externals/vertico
commit 3835ce490f0ea548a5079a83b5914691bcc739c2
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    vertico-repeat: Add candidates without properties to history
    
    Ensure that the history can be persisted by savehist-mode.
---
 extensions/vertico-repeat.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/extensions/vertico-repeat.el b/extensions/vertico-repeat.el
index 63f4d0e432..a4771d6b87 100644
--- a/extensions/vertico-repeat.el
+++ b/extensions/vertico-repeat.el
@@ -57,7 +57,7 @@
 
 (defun vertico-repeat--save-input ()
   "Save current minibuffer input."
-  (setq vertico-repeat--input (minibuffer-contents)))
+  (setq vertico-repeat--input (minibuffer-contents-no-properties)))
 
 (defun vertico-repeat--save-exit ()
   "Save command session in `vertico-repeat-history'."
@@ -68,7 +68,8 @@
     vertico-repeat--input
     (and vertico--lock-candidate
          (>= vertico--index 0)
-         (nth vertico--index vertico--candidates)))))
+         (substring-no-properties
+          (nth vertico--index vertico--candidates))))))
 
 (defun vertico-repeat--restore (session)
   "Restore Vertico SESSION for `vertico-repeat'."
@@ -85,7 +86,8 @@
 (defun vertico-repeat-save ()
   "Save Vertico session for `vertico-repeat'.
 This function must be registered as `minibuffer-setup-hook'."
-  (when (and vertico--input (not (memq this-command vertico-repeat-filter)))
+  (when (and vertico--input (symbolp this-command)
+             (not (memq this-command vertico-repeat-filter)))
     (setq vertico-repeat--command this-command)
     (add-hook 'post-command-hook #'vertico-repeat--save-input nil 'local)
     (add-hook 'minibuffer-exit-hook #'vertico-repeat--save-exit nil 'local)))



reply via email to

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