Skip to content

Commit 2529a23

Browse files
committed
Use add-to-history in ivy-read
* ivy.el (ivy--update-history): Use add-to-history (#2663, #2954).
1 parent fd8df3b commit 2529a23

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ivy.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2279,8 +2279,9 @@ customizations apply to the current completion session."
22792279
ivy-text)))
22802280
(cond ((equal item ""))
22812281
((stringp item)
2282-
(set hist (cons (propertize item 'ivy-index ivy--index)
2283-
(delete item (symbol-value hist)))))))))
2282+
(let ((history-delete-duplicates t))
2283+
(add-to-history
2284+
hist (propertize item 'ivy-index ivy--index))))))))
22842285

22852286
(defun ivy--cleanup ()
22862287
;; Fixes a bug in ESS, #1660

0 commit comments

Comments
 (0)