Terminate isearch when point has moved to another buffer
* lisp/isearch.el (isearch-post-command-hook): Terminate isearch when the command just executed has moved point to another buffer. https://lists.gnu.org/archive/html/emacs-devel/2021-04/msg00309.html
This commit is contained in:
parent
972bab0981
commit
ff796823e5
1 changed files with 4 additions and 0 deletions
|
@ -3054,6 +3054,10 @@ See more for options in `search-exit-option'."
|
|||
(goto-char isearch-pre-move-point))
|
||||
(isearch-search-and-update)))
|
||||
(setq isearch-pre-move-point nil))
|
||||
;; Terminate the search if point has moved to another buffer.
|
||||
(unless (eq isearch--current-buffer (current-buffer))
|
||||
(when (buffer-live-p isearch--current-buffer)
|
||||
(with-current-buffer isearch--current-buffer (isearch-exit))))
|
||||
(force-mode-line-update))
|
||||
|
||||
(defun isearch-quote-char (&optional count)
|
||||
|
|
Loading…
Add table
Reference in a new issue