# vim: Fix visual mode entry at line end near trailing newline \(\#50709\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ac16a7891f7278cb7c6734a767d46709bf923bc8

Requested commit: ac16a7891f7278cb7c6734a767d46709bf923bc8

Commit: ac16a7891f7278cb7c6734a767d46709bf923bc8

Tree: 1f9f607a9d31279cced88e895e03358b8ac0b2b3

Author: Skanda Bhat

Committer: GitHub

## Message

```
vim: Fix visual mode entry at line end near trailing newline (#50709)

In Helix, selecting a line with `x` creates a selection from column 0 of
the current row to column 0 of the next row. The default
`InsertEndOfLine` uses the selection head (which is on the next row) to
find the line end, placing the cursor on the wrong line. 

This commit introduces a new `HelixInsertEndOfLine`, mapped by default
to `shift-a` when Helix mode is enabled, that moves left from the head
first to land on the correct line.

Release Notes:

- Fixed `shift-a` in Helix select mode placing the cursor on the wrong
line after selecting with `x`

---------

Co-authored-by: SkandaBhat <9384046+SkandaBhat@users.noreply.github.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

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

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