Add hacky fix for annoying extra history entries from ivy/swiper
This commit is contained in:
parent
81e7ec3df0
commit
baad94b312
@ -390,6 +390,16 @@
|
|||||||
(use-package ivy :ensure
|
(use-package ivy :ensure
|
||||||
:delight
|
:delight
|
||||||
:config
|
: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))
|
(ivy-mode 1))
|
||||||
(use-package ivy-hydra :ensure)
|
(use-package ivy-hydra :ensure)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user