helix icon indicating copy to clipboard operation
helix copied to clipboard

Only render the first line of the message in end of line diagnostics

Open irh opened this issue 1 year ago • 4 comments

set_string_truncated renders the entire string while ignoring newlines, so if the diagnostic's message contains multiple lines then draw_eol_diagnostic produces output like 'first linesecond line'.

An alternative would be to reformat the message to replace newlines with spaces (or something), but I think the first line should be sufficient for end of line diagnostics.

Before: Screenshot 2024-10-02 at 10 13 25

After: Screenshot 2024-10-02 at 10 14 49

irh avatar Oct 02 '24 08:10 irh