Fix Vim 'e' Behavior When Boundary Is Last Point on Line (#7424)

This was originally just to fix
https://github.com/zed-industries/zed/issues/4354, which I did by just
returning the previous offset in `find_boundary`.. but `find_boundary`
is used in the "insert mode" / normal editor too, so returning the
previous boundary breaks existing functionality in that case.

I was considering a new `find_boundary` function just for some of the
vim motions like this, but I thought that this is straightforward enough
and future Vim functions might need similar logic too.

Release Notes:

- Fixed https://github.com/zed-industries/zed/issues/4354
This commit is contained in:
Andrew Marek 2024-02-06 19:25:56 -08:00 committed by GitHub
parent 90cd3b5e87
commit 3aa4e0c90b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 48 additions and 20 deletions

View file

@ -0,0 +1,3 @@
{"Put":{"state":"something(ˇfoo)"}}
{"Key":"}"}
{"Get":{"state":"something(fooˇ)","mode":"Normal"}}