# Always clear rename state when selections change · gitcafe/zed

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

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

Visibility: public

Requested revision: 2695b1394754d90d1d3c14d47ed43b07ee0debab

Requested commit: 2695b1394754d90d1d3c14d47ed43b07ee0debab

Commit: 2695b1394754d90d1d3c14d47ed43b07ee0debab

Tree: 89a3a43e025fc098520c79c9caa7d125d8979d83

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Always clear rename state when selections change

At some point during the implementation of rename, we added logic for
invalidating the rename state when the selection moved outside the original
rename range. After transitioning to displaying renames as a block decoration,
we don't need that anymore given that a new, temporary editor is used instead.

This commit removes that invalidation logic and always calls `Editor::take_rename`
when the editor selections change. Doing so also fixes a bug that was causing Zed
to hide the cursor when clicking on the editor to dismiss the rename.

```

## Parents

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

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