For reasons yet to be investigated, in some Emacs older versions,
callers of the completion table created by eglot-completion-at-point
will destroy text properties in the strings returned by the
"all-completions" call (destroy here means completely erase). This
completely breaks Eglot completion.
(eglot-completion-at-point): Copy substrings in all-completions
call.
(cherry picked from commit
7e2f6ce0cb1e5eb2c686451836275acf234bc354)
(dolist (c comps) (eglot--dumb-flex pattern c completion-ignore-case))
(all-completions
""
- comps
+ ;; copy strings, as some older emacs
+ ;; versions will destroy properties.
+ (mapcar #'substring comps)
(lambda (proxy)
(let* ((item (get-text-property 0 'eglot--lsp-item proxy))
(filterText (plist-get item :filterText)))