Erase the buffer only after fetching the new contents
* lisp/progmodes/xref.el (xref-revert-buffer):
Erase the buffer only after fetching the new contents (bug#46042).
(cherry picked from commit 5821dee094)
This commit is contained in:
@@ -876,10 +876,10 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)."
|
||||
(let ((inhibit-read-only t)
|
||||
(buffer-undo-list t))
|
||||
(save-excursion
|
||||
(erase-buffer)
|
||||
(condition-case err
|
||||
(xref--insert-xrefs
|
||||
(xref--analyze (funcall xref--fetcher)))
|
||||
(let ((alist (xref--analyze (funcall xref--fetcher))))
|
||||
(erase-buffer)
|
||||
(xref--insert-xrefs alist))
|
||||
(user-error
|
||||
(insert
|
||||
(propertize
|
||||
|
||||
Reference in New Issue
Block a user