# vim: Handle Helix jump labels before IME input \(\#61315\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 50ac7dc925bb3a9ed19bd1c5ba446fbb001a4146

Requested commit: 50ac7dc925bb3a9ed19bd1c5ba446fbb001a4146

Commit: 50ac7dc925bb3a9ed19bd1c5ba446fbb001a4146

Tree: af2adc16ae046e054857c3e87bfb8942f033bfec

Author: Mikhail Pertsev

Committer: GitHub

## Message

```
vim: Handle Helix jump labels before IME input (#61315)

# Objective

Fixes #59129.

`vim::HelixJumpToWord` currently treats its two-character target labels
as text input. When an IME is active, the printable label keys can
therefore enter the IME composition window instead of completing the
jump.

## Solution

- Treat an active Helix jump as command input rather than character
input, preventing the platform input handler from preferring the IME for
its label keys.
- After normal keybinding resolution, handle action-less, unmodified
label keydowns directly from the keystroke's ASCII-equivalent key. This
preserves label matching on non-ASCII keyboard layouts while leaving
Escape, custom bindings, and Ctrl/Alt/Cmd/Function shortcuts untouched.
- Stop propagation after consuming a label key so the platform does not
subsequently forward it to the IME.
- Keep the existing committed-text handling as a fallback for other
input paths.

This is complementary to #61270: that PR handles pending GPUI keybinding
chords before IME input, while this change handles Helix jump labels
after the initiating action has resolved. The changes are also
file-disjoint.

## Testing

- Added a regression test using the issue's `s` → `vim::HelixJumpToWord`
binding. The test verifies that:
  - no GPUI keybinding chord is pending;
  - Helix jump does not accept text input or prefer the IME;
  - both raw label keydown events are consumed; and
  - the expected jump completes.

- Manually tested on macOS with both ABC and Japanese Romaji input
sources.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Fixed Helix jump-to-word label input being intercepted by IMEs.
```

## Parents

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

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