# Fix ordering of multibuffer excerpts \(\#39476\) · gitcafe/zed

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

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

Visibility: public

Requested revision: aced13bc9f1eea2d7513220131585e3eb599f5b6

Requested commit: aced13bc9f1eea2d7513220131585e3eb599f5b6

Commit: aced13bc9f1eea2d7513220131585e3eb599f5b6

Tree: fe9fe8ada69a62adfe824f5bd8896cb946c1d94e

Author: Cole Miller

Committer: GitHub

## Message

```
Fix ordering of multibuffer excerpts (#39476)

The ordering of path-based excerpts in multibuffers regressed with
#38744, because we changed the `path` field of `PathKey` to be a string
(from `std::path::Path`) and used the derived `Ord` implementation,
which doesn't agree with the path-based order of worktree traversals.
This PR fixes that by using `RelPath` for `PathKey`. Instead of using
`File::full_path`, which can be absolute, we always use `File::path` and
distinguish different worktrees using their ID.

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
```

## Parents

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

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