GNU bug report logs -
#72597
30.0.60; Eglot: MarkedString with embedded Carriage Return
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
With the LSP language server I'm using, it's possible the language
server will return a textDocument/hover response MarkedString
containing "\r" (i.e., carriage return) for the line terminator when
the content contains multiple lines. An example of a typical response
is as follows:
[jsonrpc] e[19:19:44.606] <-- textDocument/hover[38]
{"jsonrpc":"2.0","id":38,"result":{"contents":[{"language":"gpr","value":"type
Library_Kinds is (\"relocatable\", \"static\",
\"static-pic\");\rLibrary_Kind : Library_Kinds :=
\"static\";"},"gtkada_shared.gpr:37:04"]}}
The font locking is performed correctly (as the highlighting looks
fine), but when the content is placed in the *eldoc* buffer, content
surrounding the carriage return is not placed on separate lines.
Instead it remains on the same line and "^M" is displayed in the
buffer.
This is what I expect:
type Library_Kinds is ("relocatable", "static", "static-pic");
Library_Kind : Library_Kinds := "static";
gtkada_shared.gpr:37:04
This is what I'm observing (single line with embedded ^M):
type Library_Kinds is ("relocatable", "static",
"static-pic");^MLibrary_Kind : Library_Kinds := "static";
gtkada_shared.gpr:37:04
This bug report was last modified 281 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.