Eglot: fix bug introduced when "fixing" middle-of-symbol completions
authorJoão Távora <joaotavora@gmail.com>
Thu, 25 Jan 2024 12:10:40 +0000 (12:10 +0000)
committerJoão Távora <joaotavora@gmail.com>
Thu, 25 Jan 2024 12:19:17 +0000 (12:19 +0000)
commit5d88c98e7c101ebad68b562334020b8c082c2ca5
treedbfd44f3facb3f280ab6f77fa91d80c9048c5cd4
parentb5d36efa5777e4cc6db1067d58224d676cedbdd3
Eglot: fix bug introduced when "fixing" middle-of-symbol completions

Culprit:

    commit a6ef458e3831001b0acad57cf8fa75b77a4aff3f
    Author: João Távora <joaotavora@gmail.com>
    Date:   Tue Dec 26 00:31:29 2023 +0000

        Eglot: partial fix for middle-of-symbol completions

The decision to restore the buffer state to when the last LSP
completion set was invoked is rock-solid (because that the state
those completions' edits apply to).

However, when caching the LSP completions across multiple
eglot-completion-at-point calls, we must make sure to also restore the
values of the local values, such as 'bounds-string'.  This allows us
to do that restoration.

* lisp/progmodes/eglot.el (eglot-completion-at-point): Also
restore bounds-string from capf session cache.

Github-reference: https://github.com/joaotavora/eglot/issues/1349
lisp/progmodes/eglot.el