From 1c709612c4eae571087344882edece0cc13b61f2 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 20 Sep 2024 14:42:22 -0400 Subject: [PATCH] * lisp/progmodes/eglot.el (eglot--signal-textDocument/didOpen): Fix bug#72696 (cherry picked from commit 29d50e245f84d62a9cf4ce00593ea4c63fc4f44d) --- lisp/progmodes/eglot.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 221d9c0727d..68cf5bfd036 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2109,6 +2109,7 @@ Use `eglot-managed-p' to determine if current buffer is managed.") (defvar revert-buffer-preserve-modes) (defun eglot--after-revert-hook () "Eglot's `after-revert-hook'." + ;; FIXME: Do we really need this? (when revert-buffer-preserve-modes (eglot--signal-textDocument/didOpen))) (defun eglot--maybe-activate-editing-mode () @@ -2865,6 +2866,8 @@ When called interactively, use the currently active server" (defun eglot--signal-textDocument/didOpen () "Send textDocument/didOpen to server." + ;; Flush any potential pending change. + (eglot--track-changes-fetch eglot--track-changes) (setq eglot--recent-changes nil eglot--versioned-identifier 0 eglot--TextDocumentIdentifier-cache nil) -- 2.39.2