# vim: Refactor and fix multiline operations \(\#25055\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 52f73e0c2dc0093a213fdf9a235517d757ce98d4

Requested commit: 52f73e0c2dc0093a213fdf9a235517d757ce98d4

Commit: 52f73e0c2dc0093a213fdf9a235517d757ce98d4

Tree: e27324ab2dc70d19927c3f35b8e9340c42324ab0

Author: 5brian

Committer: GitHub

## Message

```
vim: Refactor and fix multiline operations (#25055)

Changes:
- [x] Cursor at the start during yank operations on objects (`yip`,
`yab` etc).
- [x] Refactors this: Trim all leading and trailing whitespace from
inner multiline bracket selection.
  - This leaves a nicely indented line when doing `ci{` `vi{d` etc
  - [x] Checks for empty selection
  - [x] Removed moving cursor to the start in visual bracket operations

This cleans up the previous implementation by providing a simpler check
in `surrounding_markers`, instead of calling a new function in
`expand_object`. No functionality was changed there except for handling
the empty selection and removing some cursor adjustments that should not
have been there after further testing.

Release Notes:

- N/A
```

## Parents

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

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