]> git.eshelyaron.com Git - emacs.git/commit
Eglot: fix bug#70408 yet another way
authorJoão Távora <joaotavora@gmail.com>
Mon, 22 Apr 2024 15:37:38 +0000 (16:37 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 24 Apr 2024 17:42:30 +0000 (19:42 +0200)
commit159fd8922f97ffb72a1c50398b83621b0f89000b
tree421e4efac363f0afa3a1679ab6319edafc20383a
parent1f3653c73aa593e867855b31a71133d575bbdd5a
Eglot: fix bug#70408 yet another way

The previous fix based on comparing the Eglot-provided didOpen URI to
the server-provided textDocument/publishDiagnostics URI didn't quite
work because the URI differs slightly in escaping conventions on certain
platforms.

This elephant-size bug is easily reproducible on Windows with clangd,
where every file is basically diagnostic-free.

* lisp/progmodes/eglot.el (eglot-path-to-uri): Rework.
(eglot--TextDocumentIdentifier-cache):
Rename from eglot--TextDocumentIdentifier-uri.
(eglot-handle-notification textDocument/publishDiagnostics): Tweak.
(eglot--TextDocumentIdentifier): Rework.
(eglot--signal-textDocument/didOpen): Tweak.

(cherry picked from commit 3a4583baf679289857150ee8ecf20b61e59b9d37)
lisp/progmodes/eglot.el