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

    ivy.el (ivy-read): Call ivy-overlay-cleanup only when needed
    
    Fixes #1211
---
 ivy.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index f336336..3fadae6 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1659,7 +1659,8 @@ customizations apply to the current completion session."
                                                (cdr (symbol-value hist))))))))
                  (ivy-state-current ivy-last)))
           (remove-hook 'post-command-hook #'ivy--exhibit)
-          (ivy-overlay-cleanup)
+          (when (eq ivy-display-function 'ivy-display-function-overlay)
+            (ivy-overlay-cleanup))
           (when (setq unwind (ivy-state-unwind ivy-last))
             (funcall unwind))
           (unless (eq ivy-exit 'done)

Reply via email to