fix(view): constrain cursor in insert mode

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.
This commit is contained in:
Barrett Ruth 2026-03-08 16:00:53 -04:00
parent ac48ce20f5
commit 9f3177d9e8
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
2 changed files with 2 additions and 2 deletions

View file

@ -552,7 +552,7 @@ M.initialize = function(bufnr)
end
end,
})
vim.api.nvim_create_autocmd({ 'CursorMoved', 'ModeChanged' }, {
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI', 'ModeChanged' }, {
desc = 'Update canola preview window',
group = 'Canola',
buffer = bufnr,