# vim: Preserve trailing whitespace in inner text object selections \(\#24481\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 7bddb390cabefb177d9996dc580749d64e6ca3b6

Requested commit: 7bddb390cabefb177d9996dc580749d64e6ca3b6

Commit: 7bddb390cabefb177d9996dc580749d64e6ca3b6

Tree: b7feb7ee1f8feec5dae99a7d7fbe1f43f4efef6c

Author: 5brian

Committer: GitHub

## Message

```
vim: Preserve trailing whitespace in inner text object selections (#24481)

Closes #24438

Changes: Adjusted loop to only trim whitespace between last newline and
closing marker, when using inner objects like `y/d/c i b`

| Start   | Fixed `vib`   | Previous `vib`   |
| ---------- | ---------- | ---------- |
|
![image](https://github.com/user-attachments/assets/3d64dd7d-ed3d-4a85-9f98-f2f83799a738)
|
![image](https://github.com/user-attachments/assets/841beb59-31b1-475e-93f0-f4deaf18939c)
|
![image](https://github.com/user-attachments/assets/736d4c6f-20e1-4563-9471-1e8195455df4)
|



Release Notes:

- vim: Preserve trailing whitespace in inner text object selections

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
```

## Parents

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

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