diff options
Diffstat (limited to 'lisp/replace.el')
-rw-r--r-- | lisp/replace.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index a42f4ff4b57..a8dfd043c72 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -844,7 +844,8 @@ Compatibility function for \\[next-error] invocations." #'next-single-property-change) "No more matches") ;; In case the *Occur* buffer is visible in a nonselected window. - (set-window-point (get-buffer-window (current-buffer)) (point)) + (let ((win (get-buffer-window (current-buffer) t))) + (if win (set-window-point win (point)))) (occur-mode-goto-occurrence))) (defface match |