Remove the hack of unsetting eldoc-last-message in
eglot--eldoc-message. This allows any subsequent eglot-eldoc-function
calls (prompted by simple cursor movement) to return it immediately,
thus refreshing the help buffer with the same contents. For this to
work, we also have to set eglot--eldoc-hint globally in
eglot-eldoc-function.
An alternative to making the test pass would be to keep the hack of
unsetting eldoc-last-message only in the case that we actually get to
display the help buffer. This would actually be more efficient, but
potentially more hacky.
The bottom line here is that eldoc doesn't have a good API to deal
with asynchronous docstring fetching. See this thread: