Skip to content

Commit 5cfff34

Browse files
committed
fix: revert luasnip source to use current cursor position
1 parent 0a84023 commit 5cfff34

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/blink/cmp/sources/luasnip.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ function source:execute(ctx, item)
118118
if snip.regTrig then snip = snip:get_pattern_expand_helper() end
119119

120120
-- get (0, 0) indexed cursor position
121-
local cursor = { ctx.cursor[1] - 1, ctx.cursor[2] }
121+
local cursor = vim.api.nvim_win_get_cursor(0)
122+
cursor[1] = cursor[1] - 1
122123

123124
local expand_params = snip:matches(require('luasnip.util.util').get_current_line_to_cursor())
124125

0 commit comments

Comments
 (0)