branch: master
commit a5cd13b9487007ba6cb3eb64575800ee14589691
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel--browse-history): Work-around ring-elements
    
    Fixes #1148
---
 counsel.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index f8550f4..0a05447 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2951,7 +2951,8 @@ And insert it into the minibuffer.  Useful during 
`eval-expression'."
   (setq ivy-completion-end (point))
   (ivy-read "Symbol name: "
             (delete-dups
-             (ring-elements elements))
+             (when (> (ring-size elements) 0)
+               (ring-elements elements)))
             :action #'ivy-completion-in-region-action))
 
 (defvar eshell-history-ring)

Reply via email to