branch: elpa/isl
commit 60f798681dd732380228cb913bccd93e8887c246
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
Recenter before flashing position
---
isearch-light.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/isearch-light.el b/isearch-light.el
index d21159b56aa..b32ef707adb 100644
--- a/isearch-light.el
+++ b/isearch-light.el
@@ -345,6 +345,9 @@ It put overlay on current position, move to next overlay
using
(when isl-save-pos-to-mark-ring
(set-marker (mark-marker) isl-initial-pos)
(push-mark isl-initial-pos 'nomsg))
+ ;; Recenter before flashing avoid loosing visually position.
+ (and (not (string= isl-pattern ""))
+ (recenter))
(let ((ov (make-overlay (point-at-bol) (1+ (point-at-eol)))))
(overlay-put ov 'face 'isl-line)
(sit-for 0.2)
@@ -875,11 +878,10 @@ appended at end."
(setq isl--quit t)
(goto-char isl-initial-pos)))
(isl-cleanup)
+ ;; Avoid loosing focus in helm help buffer.
(unless (eq (window-buffer (selected-window))
isl-current-buffer)
- (switch-to-buffer isl-current-buffer))
- (and (not (string= isl-pattern ""))
- (recenter))))
+ (switch-to-buffer isl-current-buffer))))
;;;###autoload
(defun isl-search ()