Skip to content

Commit

Permalink
fix: cusorr pos is incorrect in insert mode at the end of the line
Browse files Browse the repository at this point in the history
Ref: #171
  • Loading branch information
gbprod committed May 3, 2024
1 parent 7c5cbf0 commit f00168d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/yanky/telescope/mapping.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function mapping.put(type)

vim.schedule(function()
if nil ~= cursor_pos then
vim.api.nvim_win_set_cursor(0, { cursor_pos[1], math.max(cursor_pos[2] - 1, 0) })
vim.api.nvim_win_set_cursor(0, { cursor_pos[1], math.max(cursor_pos[2], 0) })
end
picker.actions.put(type, mapping.state.is_visual)(selection.value)
end)
Expand Down

0 comments on commit f00168d

Please sign in to comment.