# Use the entire \`ProjectPath\` to find open buffer for an LSP diagnostic · gitcafe/zed

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

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

Visibility: public

Requested revision: eaa6637b0598009b0653e90e051f129bda1ef8d2

Requested commit: eaa6637b0598009b0653e90e051f129bda1ef8d2

Commit: eaa6637b0598009b0653e90e051f129bda1ef8d2

Tree: 770ee76089b9e2018f4060c2edbbf40c73ae7577

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Use the entire `ProjectPath` to find open buffer for an LSP diagnostic

Previously, we would only compare the path relative to the worktree root, which
would cause Zed to sometimes update diagnostics on the wrong buffer. This
manifested in the project diagnostics not showing those errors/warnings while
the status bar and the tab title displayed a summary with errors/warnings.

This commit simply uses `Project::get_open_buffer` which correctly locates a
buffer with the given project path.

```

## Parents

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

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