# editor: Fix completion labels not being rendered completely \(\#56976\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 98fe76caadfd71d09eb29de885d0e7b439956e38

Requested commit: 98fe76caadfd71d09eb29de885d0e7b439956e38

Commit: 98fe76caadfd71d09eb29de885d0e7b439956e38

Tree: c43e7e6c797e55adbdb7289ab473d94d6d7641f5

Author: davidhi7

Committer: GitHub

## Message

```
editor: Fix completion labels not being rendered completely (#56976)

PR https://github.com/zed-industries/zed/pull/45892 changed the logic
for rendering completion labels and divided rendering up into the "main"
part (consisting of the completion's `filter_range`) and "details" part
(everything after `filter_range`), but no longer renders text that comes
before the `filter_range`. This text is probably not relevant in too
many cases but makes some Rust completions unclear and ambiguous, as can
be seen in this example:

Without this change:
<img width="1262" height="313" alt="Image"
src="https://github.com/user-attachments/assets/dcdd9da4-c449-445d-b379-771b368c3778"
/>

With this change:
<img width="1328" height="376" alt="grafik"
src="https://github.com/user-attachments/assets/05fdaf95-7a18-4d50-8e3b-35be10d9a1ef"
/>

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #56973

Release Notes:

- Fix completion labels not being rendered completely

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
```

## Parents

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

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