# lsp: Fix buffer snapshots sometimes going missing \(\#25548\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 86283f4e3d9d291e8a440eecaacd42d62e8ae4cd

Requested commit: 86283f4e3d9d291e8a440eecaacd42d62e8ae4cd

Commit: 86283f4e3d9d291e8a440eecaacd42d62e8ae4cd

Tree: c9db486340166da95a3eef620fd68028ebf96e77

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
lsp: Fix buffer snapshots sometimes going missing (#25548)

A call to register_buffer_with_language_servers could nuke existing
snapshots, even when the buffer was already registered with a server.

Essentially, had we had the else branch in place, this would have been
detected.

Closes #ISSUE

Release Notes:

- Fixed Rust analyzer renames sometimes failing. (Preview only)
```

## Parents

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

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