# gpui: Fix utf8 slicing panic in \`truncate_line\` \(\#46914\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 3ed6c68f3b3c25e35aab2a69433b68a316e5258c

Requested commit: 3ed6c68f3b3c25e35aab2a69433b68a316e5258c

Commit: 3ed6c68f3b3c25e35aab2a69433b68a316e5258c

Tree: 9887ced6b2e68d942003738b0d57e56d94c92d66

Author: Lukas Wirth

Committer: GitHub

## Message

```
gpui: Fix utf8 slicing panic in `truncate_line` (#46914)

Fixes https://github.com/zed-industries/zed/issues/46904

Release Notes:

- Fixed a panic in the git panel when utf8 multibyte character filenames
got truncated
```

## Parents

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

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