Function: isearch-back-into-window

isearch-back-into-window is a byte-compiled function defined in isearch.el.gz.

Signature

(isearch-back-into-window ABOVE ISEARCH-POINT)

Documentation

Scroll the window to bring the search string back into view.

Restore point to ISEARCH-POINT in the process. ABOVE is t when the search string is above the top of the window, nil when it is beneath the bottom.

Source Code

;; Defined in /usr/src/emacs/lisp/isearch.el.gz
(defun isearch-back-into-window (above isearch-point)
  "Scroll the window to bring the search string back into view.
Restore point to ISEARCH-POINT in the process.  ABOVE is t when the
search string is above the top of the window, nil when it is beneath
the bottom."
  (let (start end)
    (if isearch-forward
        (setq end isearch-point  start (or isearch-other-end isearch-point))
      (setq start isearch-point  end (or isearch-other-end isearch-point)))
    (if above
        (progn
          (goto-char start)
          (recenter-window-group 0)
          (when (>= isearch-point (window-group-end nil t))
            (goto-char isearch-point)
            (recenter-window-group -1)))
      (goto-char end)
      (recenter-window-group -1)
      (when (< isearch-point (window-group-start))
        (goto-char isearch-point)
        (recenter-window-group 0))))
  (goto-char isearch-point))