# helix: Always offset cursor on selection \(\#46311\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 81da953acfdcba1951875abb9664cd371d4c7f86

Requested commit: 81da953acfdcba1951875abb9664cd371d4c7f86

Commit: 81da953acfdcba1951875abb9664cd371d4c7f86

Tree: 897fd65008efa678064901b66f966f4365afb306

Author: Josh Robson Chase

Committer: GitHub

## Message

```
helix: Always offset cursor on selection (#46311)

https://github.com/zed-industries/zed/pull/42837 added the
`cursor_offset_on_selection` field, which displays the cursor *after*
the end of the selection unless a vim visual mode is enabled, in which
case it gets displayed *at* the end of the selection.

However, the real helix is effectively *always* in select mode, and will
always display the cursor at the end of the selection, whether that
selection is made via its visual mode, a movement key, or with the
mouse.

This makes it so that the helix mode setting is taken into account
regardless of the visual-ness of the vim mode in the `sync_vim_settings`
method.

I also considered simply moving `Mode::HelixNormal` up to the `true` arm
of the match in the `is_visual` method since helix is kinda *always* in
visual mode, but I figured that could have some unintended consequences
and chose to err on the side of caution.

Possibly related to #20121

Closes #46998

Release Notes:

- Fixed the cursor offset in non-visual helix selections

Co-authored-by: Nils Koch <mail@nilskch.dev>
```

## Parents

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

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