# helix: Fix helix-paste mode in line mode \(\#38663\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 46d19d8a47ca059913c2fcb1a06c6543a62b434c

Requested commit: 46d19d8a47ca059913c2fcb1a06c6543a62b434c

Commit: 46d19d8a47ca059913c2fcb1a06c6543a62b434c

Tree: 098a9b45a01e2126b6f4e7d8cac9355a1782b179

Author: Jakub Konka

Committer: GitHub

## Message

```
helix: Fix helix-paste mode in line mode (#38663)

In particular,
* if the selection ends at the beginning of the next line, and the
current line under the cursor is empty, we paste at the selection's end.
* if however the current line under the cursor is empty, we need to move
to the beginning of the next line to avoid pasting above the end of
current selection

In addition, in line mode, we always move the cursor to the end of the
inserted text. Otherwise, while it looks fine visually,
inserting/appending ends up in the next logical line which is not
desirable.

Release Notes:

- N/A
```

## Parents

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

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