diff options
author | João Távora <joaotavora@gmail.com> | 2023-02-24 14:48:01 +0000 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2023-02-24 14:48:01 +0000 |
commit | 55d29c9bacb6227bc8b3a6c0dd52c7085fe63aaf (patch) | |
tree | ddfedd061784100476fdd5b84ae489c8aa34e1b4 /lisp/emacs-lisp/package-vc.el | |
parent | 5db75ec7d30d5cf5dc610382ca25bd5a5c4f8fb6 (diff) | |
download | emacs-55d29c9bacb6227bc8b3a6c0dd52c7085fe63aaf.tar.gz emacs-55d29c9bacb6227bc8b3a6c0dd52c7085fe63aaf.tar.bz2 emacs-55d29c9bacb6227bc8b3a6c0dd52c7085fe63aaf.zip |
Eglot: fix jit-lock inlay hint bugs
One of the bugs was straightforward. The timer function of
eglot--update-hints must set the correct buffer.
The other is much more odd. When using Eglot on Emacs's own
src/coding.c, the jit-lock code starts calling its jit-functions over
and over again with the same sequence of arguments, like so:
======================================================================
1 -> (eglot--update-hints 63551 65051)
1 <- eglot--update-hints: [nil 25592 52026 4
======================================================================
1 -> (eglot--update-hints 65051 66551)
1 <- eglot--update-hints: [nil 25592 52026 4
======================================================================
1 -> (eglot--update-hints-1 63551 66551)
1 <- eglot--update-hints-1: nil
======================================================================
1 -> (eglot--update-hints 63551 65051)
1 <- eglot--update-hints: [nil 25592 52026 4
======================================================================
1 -> (eglot--update-hints 65051 66551)
1 <- eglot--update-hints: [nil 25592 52026 5
======================================================================
1 -> (eglot--update-hints-1 63551 66551)
1 <- eglot--update-hints-1: nil
This continues forever at a very fast rate and saturates the LSP
channel.
At first I thought that it was because eglot--update-hints-1 is
actually causing the buffer to be modified with overlays sometime in
the future, but it is not so! It seems that merely calling
(goto-char (eglot--lsp-position-to-point position))
(from the LSP request handler in eglot--update-hints-1) will cause
this bug.
* lisp/progmodes/eglot.el (eglot--update-hints): Fix bugs.
Diffstat (limited to 'lisp/emacs-lisp/package-vc.el')
0 files changed, 0 insertions, 0 deletions