branch: master
commit d1f88fa55b8c01781cc75358407e7aa21cfba307
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-read): Don't put empty string on history
---
ivy.el | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ivy.el b/ivy.el
index fc11c3d..4aff281 100644
--- a/ivy.el
+++ b/ivy.el
@@ -819,9 +819,10 @@ candidates with each input."
(let ((item (if ivy--directory
ivy--current
ivy-text)))
- (set hist (cons (propertize item 'ivy-index ivy--index)
- (delete item
- (cdr (symbol-value hist))))))
+ (unless (equal item "")
+ (set hist (cons (propertize item 'ivy-index ivy--index)
+ (delete item
+ (cdr (symbol-value hist)))))))
res)))
(remove-hook 'post-command-hook #'ivy--exhibit)
(when (setq unwind (ivy-state-unwind ivy-last))