Closed Bob131 closed 2 years ago
c/c @jcs090218
@Bob131 Can you try print the full raw text here? Sorry, I cannot setup [clangd]() on my current machine, so I cannot see what's the document look like. 😕
Would #643 fix the issue?
I just tried applying it, and it doesn't address the issue.
Here's a sample of the output from clangd for a random macro in GLib:
### macro `TYPE`
---
```cpp
#define TYPE(Char) \\
(((Char) <= G_UNICODE_LAST_CHAR_PART1) \\
? TTYPE_PART1 ((Char) >> 8, (Char) &0xff) \\
: (((Char) >= 0xe0000 && (Char) <= G_UNICODE_LAST_CHAR) \\
? TTYPE_PART2 (((Char) -0xe0000) >> 8, (Char) &0xff) \\
: G_UNICODE_UNASSIGNED))
```
Here is the same sample after applying the previous fill-region
code or the new lsp-ui-doc--fill-document
:
### macro `TYPE`
--- ```cpp #define TYPE(Char) \\ (((Char) <= G_UNICODE_LAST_CHAR_PART1) \\ ? TTYPE_PART1 ((Char) >> 8, (Char) &0xff) \\ : (((Char) >= 0xe0000 &&
(Char) <= G_UNICODE_LAST_CHAR) \\ ? TTYPE_PART2 (((Char) -0xe0000) >> 8, (Char) &0xff) \\ : G_UNICODE_UNASSIGNED)) ```
I have changed to check the length of the first line in paragraph. I have also tested on my machine, this should be working now.
@Bob131 Can you get the latest version and see if this issue is resolved? Thanks!
Yep, that's better. Thanks!
The
fill-region
introduced by ~1766df5~ deeefa0ce03fdb4927f6ff5195010aef494f9b4c can result in documentation text being placed on the same line as---
; this text is then deleted with the horizontal rule bylsp-ui-doc--handle-hr-lines
. Since this change, almost all the lsp-ui-doc popups produced with clangd are empty.