# gpui: Add \`text_ellipsis_start\` method \(\#45122\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 62d36b22fd1c497ae586f89f21b7a80ea6d8091a

Requested commit: 62d36b22fd1c497ae586f89f21b7a80ea6d8091a

Commit: 62d36b22fd1c497ae586f89f21b7a80ea6d8091a

Tree: fadd2dbab82c4fb05ed4241a2dd107bf0adf6226

Author: Danilo Leal

Committer: GitHub

## Message

```
gpui: Add `text_ellipsis_start` method (#45122)

This PR is an additive change introducing the `truncate_start` method to
labels, which gives us the ability to add an ellipsis at the beginning
of the text as opposed to the regular `truncate`. This will be generally
used for truncating file paths, where the end is typically more relevant
than the beginning, but given it's a general method, there's the
possibility to be used anywhere else, too.

<img width="500" height="690" alt="Screenshot 2025-12-17 at 12  35@2x"
src="https://github.com/user-attachments/assets/f853f5a3-60b3-4380-a11c-bb47868a4470"
/>

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
```

## Parents

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

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