fix(view): constrain cursor in insert mode #93

Merged
barrettruth merged 2 commits from fix/constrain-cursor-insert into main 2026-03-08 20:02:10 +00:00
barrettruth commented 2026-03-08 20:01:07 +00:00

Problem

constrain_cursor only fired on CursorMoved and ModeChanged, so arrow key navigation in insert mode could move the cursor into the concealed ID prefix area.

Solution

Add CursorMovedI to the autocmd event list. The constrain_cursor() function is already mode-agnostic.

Fixes upstream stevearc/oil.nvim#371.

## Problem `constrain_cursor` only fired on `CursorMoved` and `ModeChanged`, so arrow key navigation in insert mode could move the cursor into the concealed ID prefix area. ## Solution Add `CursorMovedI` to the autocmd event list. The `constrain_cursor()` function is already mode-agnostic. Fixes upstream [stevearc/oil.nvim#371](https://github.com/stevearc/oil.nvim/issues/371).
Sign in to join this conversation.
No description provided.