# Fix multiline text truncation \(\#57450\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ba350974afa890c7dfce0abdf7a721773288de87

Requested commit: ba350974afa890c7dfce0abdf7a721773288de87

Commit: ba350974afa890c7dfce0abdf7a721773288de87

Tree: 20d6dba35bc544ab140b4f32a58c8dd6052a18a8

Author: Conrad Irwin

Committer: GitHub

## Message

```
Fix multiline text truncation (#57450)

Improves .text_truncate() in combination with .line_clamp()

<img width="384" height="124" alt="Screenshot 2026-05-21 at 4 28 59 PM"
src="https://github.com/user-attachments/assets/3decc78c-8d5d-4d34-84c5-4274a2d12bea"
/>
<img width="385" height="143" alt="Screenshot 2026-05-21 at 4 26 23 PM"
src="https://github.com/user-attachments/assets/f807b19a-6834-4504-9749-e16b8d68a7aa"
/>

This was previously broken because we assumed lines would break evenly.

Release Notes:

- Improved truncation of multi-line text in the UI
```

## Parents

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

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