mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 15:56:35 -04:00
Eglot: do more orthodox use of progress reporters (bug#81514)
The progress reporters on recent Emacs has backward incompatible changes, but our use of them wasn't too correct either. * lisp/progmodes/eglot.el (eglot-handle-notification): Call progress-reporter-done.
This commit is contained in:
parent
0b8d2acdd2
commit
cf98d9d725
|
|
@ -2872,7 +2872,8 @@ return it back to the server. :null is returned if the list was empty."
|
|||
(if (eq eglot-report-progress 'messages)
|
||||
(make-progress-reporter
|
||||
(format "[eglot] %s %s: %s"
|
||||
(eglot-project-nickname server) token title))
|
||||
(eglot-project-nickname server) token title)
|
||||
0 100)
|
||||
(list 'eglot--mode-line-reporter token title)))
|
||||
(upd (pcnt msg &optional
|
||||
(pr (gethash token (eglot--progress-reporters server))))
|
||||
|
|
@ -2880,7 +2881,10 @@ return it back to the server. :null is returned if the list was empty."
|
|||
((eq (car pr) 'eglot--mode-line-reporter)
|
||||
(setcdr (cddr pr) (list msg pcnt))
|
||||
(force-mode-line-update t))
|
||||
(pr (eglot--reporter-update pr pcnt msg)))))
|
||||
(pr
|
||||
(if (eql pcnt 100)
|
||||
(progress-reporter-done pr)
|
||||
(eglot--reporter-update pr pcnt msg))))))
|
||||
(eglot--dbind ((WorkDoneProgress) kind title percentage message) value
|
||||
(pcase kind
|
||||
("begin"
|
||||
|
|
|
|||
Loading…
Reference in a new issue