# vim: Fix change surround adding unwanted spaces with quotes \(\#42431\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e833d1af8d8ba7b3445b07df7356108886cb40aa

Requested commit: e833d1af8d8ba7b3445b07df7356108886cb40aa

Commit: e833d1af8d8ba7b3445b07df7356108886cb40aa

Tree: 60cff9dbbec03082fa7792410b4dc448e1ed0894

Author: Hans

Committer: GitHub

## Message

```
vim: Fix change surround adding unwanted spaces with quotes (#42431)

Update `Vim.change_surround` in order to ensure that there's no
overlapping edits by keeping track of where the open string range ends
and ensuring that the closing string range start does not go lower than
the open string range end.

Closes #42316 

Release Notes:

- Fix vim's change surrounds `cs` inserting spaces with quotes by
preventing overlapping edits

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

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

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