Browse files

clean up old occurrences when calling from isearch

If iedit-mode-from-isearch is called when iedit is already active, 
it's possible to have overlays for two different patterns at the same time.
This cleans up the old occurrences before making new ones.
  • Loading branch information...
mbneedham committed Jan 25, 2013
1 parent ceb7298 commit 46d5f65019428ba928dd90f28bbbe0f6a5586714
Showing with 2 additions and 0 deletions.
  1. +2 −0 iedit.el
@@ -362,6 +362,8 @@ Keymap used within overlays:
(setq mark-active nil)
(run-hooks 'deactivate-mark-hook)
+ (when iedit-mode
+ (iedit-cleanup))
(iedit-start regexp (point-min) (point-max))
;; TODO: reconsider how to avoid the loop in iedit-same-length
(cond ((not iedit-occurrences-overlays)

0 comments on commit 46d5f65

Please sign in to comment.