]> git.eshelyaron.com Git - emacs.git/commit
(eglot--signal-textDocument/didChange): Fix tests
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 19 Apr 2024 03:39:30 +0000 (23:39 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sat, 20 Apr 2024 11:08:24 +0000 (14:08 +0300)
commitd8a91f0bc9301a05f293dec9d37474ed7b707633
treecb7b377e40929843b2d070c22158760f228deb73
parent03856427b67eeddba27cf896244074add8302bd1
(eglot--signal-textDocument/didChange): Fix tests

The tests call `eglot--signal-textDocument/didChange` eagerly,
which means in the case where we use `track-changes` that they
call it before the tracker's signal has been called.
So make sure we fetch pending changes even if we haven't yet
been notified of them, and make sure `eglot--versioned-identifier`
is incremented even when the signal is not called.

* lisp/progmodes/eglot.el (eglot--track-changes-fetch)
(eglot--after-change): Increment `eglot--versioned-identifier` here...
(eglot--track-changes-signal): ...instead of here.
(eglot--signal-textDocument/didChange): Try and fetch changes even if the
tracker's signal wasn't called yet.

* test/lisp/progmodes/eglot-tests.el (eglot-tests--get): New function.
(eglot-tests--lsp-abiding-column-1): Use it.

(cherry picked from commit c833892140fbf4be45161bf85d4c1253c5503949)
lisp/progmodes/eglot.el
test/lisp/progmodes/eglot-tests.el