]> git.eshelyaron.com Git - emacs.git/commit
Prefer documentchanges to changes in server-initiated edits
authorTheodor Thornhill <theo@thornhill.no>
Fri, 9 Sep 2022 21:25:50 +0000 (23:25 +0200)
committerGitHub <noreply@github.com>
Fri, 9 Sep 2022 21:25:50 +0000 (22:25 +0100)
commitd2e842bbf51134bfd33943247faa88db99a36842
treeace1282ff775624c4d7d3f2f87bf5402e2b7d02d
parentdd017359e974ff2bbbb0db8ceba8e13de6035900
Prefer documentchanges to changes in server-initiated edits

Some servers return both.

PR: https://github.com/joaotavora/eglot/issues/949

* eglot.el (eglot--apply-workspace-edit): When both documentChanges
and changes are present, prefer the documentChanges.  By doing that we
ensure that we don't double edit, rendering the document in an
unusable state.

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/704
lisp/progmodes/eglot.el