# svg_preview: Ensure preview properly updates in follow mode \(\#38081\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 2143c59fba8a2b2a93cbff1e7f8835b534bc8248

Requested commit: 2143c59fba8a2b2a93cbff1e7f8835b534bc8248

Commit: 2143c59fba8a2b2a93cbff1e7f8835b534bc8248

Tree: bfd0eec7a2de191d1a3e01909b4fd8355e959496

Author: Finn Evers

Committer: GitHub

## Message

```
svg_preview: Ensure preview properly updates in follow mode (#38081)

This fixes an issue where we would not update neither the path nor the
editor that was listened to during follow mode, which in turn would
cause the preview to become stale.

Fix here is to update the subscription whenever the active item changes
and also update the associated path accordingly.


Release Notes:

- Fixed an issue where the SVG preview would not update when following
the active editor.
```

## Parents

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

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