# editor: Treat blank rename as no-op \(\#62630\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5fa874234f748c596fdf03678a0d4c7e7ec91663

Requested commit: 5fa874234f748c596fdf03678a0d4c7e7ec91663

Commit: 5fa874234f748c596fdf03678a0d4c7e7ec91663

Tree: 916778a752cd0710e7e7694f319ef63b3f03b5d5

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
editor: Treat blank rename as no-op (#62630)

Confirming an inline rename after deleting the entire symbol name or
entering only whitespace currently submits an invalid rename request to
the language server. This can remove the symbol text instead of leaving
the source unchanged.

Treat empty and whitespace-only replacements as successful no-ops after
dismissing the inline rename UI. Returning a completed task also
consumes the confirmation action, preventing Enter from propagating back
into the editor. Non-blank rename behavior remains unchanged.

The regression test covers both empty and whitespace-only rename fields,
verifying that no LSP rename request is sent and the original buffer
remains intact.

Release Notes:

- editor: Fixed confirming a blank symbol LSP-rename modifying the
source code
```

## Parents

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

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