# vim: Fix subword motion near end of line \(\#45908\) · gitcafe/zed

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

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

Visibility: public

Requested revision: b5242ab5f2aa1c657839dbbcbf7c1af713b0306a

Requested commit: b5242ab5f2aa1c657839dbbcbf7c1af713b0306a

Commit: b5242ab5f2aa1c657839dbbcbf7c1af713b0306a

Tree: 526f3e642daa026ae8c9a782c0485bc760970fb3

Author: Lionel Henry

Committer: GitHub

## Message

```
vim: Fix subword motion near end of line (#45908)

Fixes subword motion incorrectly jumping to next line when near end of
line. Updates boundary detection to use exclusive boundaries with
need_next_char parameter, matching regular word motion behavior.
Refactors word and subword motion to share boundary detection logic.

Closes #17780

Release Notes:

- Fixed subword motion incorrectly jumping to the next line when near
the end of a line

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

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

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