Add hacky fix for annoying extra history entries from ivy/swiper

This commit is contained in:
Adam Goldsmith 2020-05-17 21:41:55 -04:00
parent 81e7ec3df0
commit baad94b312

View File

@ -390,6 +390,16 @@
(use-package ivy :ensure
:delight
:config
;; hacky temp fix for issue where counsel-find-file drops the
;; search string into history as well as the matched file
;; reverts https://github.com/abo-abo/swiper/commit/334d08c
(defun ivy--update-history (hist)
(let ((item (ivy-state-current ivy-last)))
(cond ((equal item ""))
((stringp item)
(set hist (cons (propertize item 'ivy-index ivy--index)
(delete item (symbol-value hist))))))))
(ivy-mode 1))
(use-package ivy-hydra :ensure)