]> git.eshelyaron.com Git - emacs.git/commitdiff
Small correction to `isearch-lazy-highlight-buffer-update'
authorAugusto Stoffel <arstoffel@gmail.com>
Fri, 12 Feb 2021 18:29:54 +0000 (19:29 +0100)
committerJuri Linkov <juri@linkov.net>
Sat, 13 Feb 2021 18:30:25 +0000 (20:30 +0200)
The value of point is now read after a potential change of buffer.
* lisp/isearch.el (isearch-lazy-highlight-buffer-update): Move call
to `point' after `select-window'.

Copyright-paperwork-exempt: yes

lisp/isearch.el

index b58ca8a6f70ae5e3ba4490fd2c8477a77366239e..c571ea9467068f62d892f317465da4765c0227de 100644 (file)
@@ -4127,13 +4127,13 @@ Attempt to do the search exactly the way the pending Isearch would."
   "Update highlighting of other matches in the full buffer."
   (let ((max lazy-highlight-buffer-max-at-a-time)
         (looping t)
-        nomore window-start window-end
-        (opoint (point)))
+        nomore opoint window-start window-end)
     (with-local-quit
       (save-selected-window
        (if (and (window-live-p isearch-lazy-highlight-window)
                 (not (memq (selected-window) isearch-lazy-highlight-window-group)))
            (select-window isearch-lazy-highlight-window))
+       (setq opoint (point))
        (setq window-start (window-group-start))
        (setq window-end (window-group-end))
        (save-excursion