Skip to content

Commit ceeeb53

Browse files
committed
fix: add back cursor move after accept, but use current line
1 parent cab91c5 commit ceeeb53

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/blink/cmp/accept/init.lua

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ local function accept(item)
4141
else
4242
table.insert(all_text_edits, item.textEdit)
4343
text_edits_lib.apply_text_edits(item.client_id, all_text_edits)
44+
vim.api.nvim_win_set_cursor(0, {
45+
vim.api.nvim_win_get_cursor(0)[1],
46+
item.textEdit.range.start.character + #item.textEdit.newText + offset,
47+
})
4448
end
4549

4650
-- Check semantic tokens for brackets, if needed, and apply additional text edits

0 commit comments

Comments
 (0)