Skip to content

fix: arrow keys lose selection in vim visual mode#9172

Merged
kirangadhave merged 1 commit intomainfrom
kg/vim-arrow-keys
Apr 13, 2026
Merged

fix: arrow keys lose selection in vim visual mode#9172
kirangadhave merged 1 commit intomainfrom
kg/vim-arrow-keys

Conversation

@kirangadhave
Copy link
Copy Markdown
Member

@kirangadhave kirangadhave commented Apr 13, 2026

Closes #9108

Issue reported: In visual mode, arrow keys defaulted to codemirror cursorLineDown behavior instead of vim selectLineDown. Same for other arrow keys.

Fix:
Replaced default arrow key bindings with visual mode wrappers that defer to vim in visual mode but preserver codemirror behavior in normal/insert mode.
Removed preventDefault/stopPropogation from cell keymap arrow bindings to prevent merged keymap from blocking vim event handlers.

Tested the fix in vim mode.

Screen.Recording.2026-04-13.at.2.59.48.PM.mov

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Apr 13, 2026 7:49pm

Request Review

@kirangadhave kirangadhave added the bug Something isn't working label Apr 13, 2026
@akshayka akshayka added the bash-focus Area to focus on during release bug bash label Apr 13, 2026
Copy link
Copy Markdown
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice video walkthrough in the PR description

@kirangadhave kirangadhave merged commit f41deed into main Apr 13, 2026
34 of 35 checks passed
@kirangadhave kirangadhave deleted the kg/vim-arrow-keys branch April 13, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash-focus Area to focus on during release bug bash bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arrows do not work in vim mode

2 participants