# assistant_context_editor: Fix patch block not rendering due to window reborrow \(\#24461\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8ff8dbdb2baa990ab2c3bcb202f1e8c2a070d76c

Requested commit: 8ff8dbdb2baa990ab2c3bcb202f1e8c2a070d76c

Commit: 8ff8dbdb2baa990ab2c3bcb202f1e8c2a070d76c

Tree: b8bd2c59492ec610968d73aa273907193dc3a9b0

Author: Marshall Bowers

Committer: GitHub

## Message

```
assistant_context_editor: Fix patch block not rendering due to window reborrow (#24461)

This PR fixes an issue where the Assistant patch block was not being
rendered when using "Suggest Edits".

The issue was that the `BlockContext` already has a borrow of the
`Window`, so we can't use `update_in` to reborrow the window.

The fix is to reuse the existing `&mut Window` reference from the
`BlockContext` so we don't need to `update_in`.

Closes #24169.

Release Notes:

- Assistant: Fixed an issue where the patch block was not being rendered
when using "Suggest Edits".

---------

Co-authored-by: Max <max@zed.dev>
```

## Parents

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

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