emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.03k stars 141 forks source link

Scrolling in ui-doc child frame eventually causes Emacs to freeze #619

Open douglasdavis opened 3 years ago

douglasdavis commented 3 years ago

This is happening to me with the following setup:

After running M-x lsp in a Python project buffer and hovering over a symbol with a lengthy docstring, if I scroll down through a bit of the child frame Emacs eventually freezes. It's not obvious to me what is triggering the freeze. I'm happy to try any recommended tests.

I tested with lsp-ui-doc-use-webkit set to t (after compiling using --with-xwidgets and the freezing doesn't occur; perhaps there's an issue with the markdown rendering of the default setting.

Another observed feature: the freezing appears to consistently happen when encountering an Examples block in a python docstring, something of the form:


Some description....

Examples
--------
>>> from foo import bar
>>> x = bar()
>>> x * 2
>>> 4
douglasdavis commented 3 years ago

I'm pretty confident now that it's due to the way the >>> lines are getting rendered by markdown. If I surround the example triple back ticks ("``") (i.e. use markdown syntax) the freeze disappears. Unfortunately Python docstrings are more RST like than markdown. After more testing the issue is also not isolated to the presence of>>>`'s. Overall it appears to be an issue with markdown, perhaps related to https://github.com/emacs-lsp/lsp-ui/issues/611 but I'm not sure.

padraic-mcatee commented 2 years ago

I'm seeing the exact same behavior.

System Info :computer: