]> git.eshelyaron.com Git - emacs.git/commit
Correctly check buffer mtime when displaying xref matches
authorSpencer Baugh <sbaugh@janestreet.com>
Tue, 26 Mar 2024 12:44:25 +0000 (08:44 -0400)
committerEshel Yaron <me@eshelyaron.com>
Thu, 28 Mar 2024 10:28:35 +0000 (11:28 +0100)
commit707b24b757b2c4dc47bce22c7aa8d70d5c8a0bb0
tree5cc96af3540a49ce5f81eb53c24940321ac1b26f
parent17e9cbf7039ad24096b1141deb10cce54f485ee9
Correctly check buffer mtime when displaying xref matches

This was just a typo: we were checking the modification time of
current-buffer instead of checking the modification time of the
passed-in buffer.

This caused matches to not be shown if they weren't present in
the current in-Emacs state of the buffer.

This was easily reproduced by writing a string to a file outside
Emacs, then searching for that string with
e.g. project-find-regexp.  The string would seemingly not be
found, although in reality it was found, just not displayed.

* lisp/progmodes/xref.el (xref--find-file-buffer):
Check buf, not current-buffer (bug#70008).

(cherry picked from commit 5efa2ddf62d4876fb62f23b571f4cc0af5885639)
lisp/progmodes/xref.el