# Fix newlines in language server logs when switching log types \+ misc \(\#32659\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/babf846ef9130eb19c4cdab858a9f54262b00641)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: babf846ef9130eb19c4cdab858a9f54262b00641

Requested commit: babf846ef9130eb19c4cdab858a9f54262b00641

Commit: babf846ef9130eb19c4cdab858a9f54262b00641

Tree: dc3449b916bbae4ba087a4a47f73c00ae3c3da1a

Author: Michael Sloan

Committer: GitHub

## Message

```
Fix newlines in language server logs when switching log types + misc (#32659)

Mistake in #31863 where the stored log entries no longer had a format
that could simply have `\n` added after each entry.

Also fixes a potential crash in the long line folding logic if unicode
was in the logs - introduced in #22996.

Also updates the log line truncation logic to never exceed the
pre-allocated capacity

Release Notes:

- N/A
```

## Parents

- [9a6e8a19b573a62ca74155aa77b2a343ed501ab6](https://git.cafe/gitcafe/zed/commit/9a6e8a19b573a62ca74155aa77b2a343ed501ab6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/babf846ef9130eb19c4cdab858a9f54262b00641?format=markdown)
