branch: master
commit c78cc15626cddd3551a6d0e45bff875ccfe83361
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    swiper.el: Clean up overlays better on "C-g"
    
    * swiper.el (swiper--cleanup): Improve.
    
    Fixes #11.
---
 swiper.el |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/swiper.el b/swiper.el
index fad7aa2..8975136 100644
--- a/swiper.el
+++ b/swiper.el
@@ -205,7 +205,10 @@ When non-nil, INITIAL-INPUT is the initial search pattern."
 (defun swiper--cleanup ()
   "Clean up the overlays."
   (while swiper--overlays
-    (delete-overlay (pop swiper--overlays))))
+    (delete-overlay (pop swiper--overlays)))
+  (save-excursion
+    (goto-char (point-min))
+    (isearch-clean-overlays)))
 
 (defvar swiper--overlays nil
   "Store overlays.")

Reply via email to