You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: handle difference in nvim-cmp and blink.cmp cursor context
## Details
Issue: #310
`nvim-cmp` passes the cursor position as a (1,1)-indexed value by
adjusting the column output of `nvim_win_get_cursor`.
`blink.cmp` does not make this adjustment and directly passes the
(1,0)-indexed value from `nvim_win_get_cursor`.
Previously we did not handle this difference and would subtract 1 from
the column resulting in an exception due to negative values. The fix is
to account for this difference when adjusting the values to treesitter's
(0,0)-indexed APIs.
I'm not 100% sure why this did not crop up before while testing but
likely related to this note from the `0.11.0` release:
> [!IMPORTANT]
> Blink.cmp now fetches the completion items immediately upon entering
> insert mode by default. More ideas for prefetching are being explored!
So we still had the off by 1 column issue but since items were not being
pre-fetched and due to the trigger characters configuration the column
would always be > 0, so it would not error.
0 commit comments