# Differentiate among tabs with the same name · gitcafe/zed

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

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

Visibility: public

Requested revision: 07d269234f4872df5ef02b711396358df56fc63a

Requested commit: 07d269234f4872df5ef02b711396358df56fc63a

Commit: 07d269234f4872df5ef02b711396358df56fc63a

Tree: b23d2c60e95f14d3b450773979d215bdb02f406c

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Differentiate among tabs with the same name

This commit introduces a new, optional `Item::tab_description` method
that lets implementers define a description for the tab with a certain
`detail`. When two or more tabs match the same description, we will
increase the `detail` until tabs don't match anymore or increasing the
`detail` doesn't disambiguate tabs any further.

As soon as we find a valid `detail` that disambiguates tabs enough, we
will pass it to `Item::tab_content`. In `Editor`, this is implemented by
showing more and more of the path's suffix as `detail` is increased.

```

## Parents

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

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