Skip to content

Commit d39ad2a

Browse files
fix(edit action): update jumplist when moving in same file (#3205)
C-o behaves unintuitively when same file is selected at different position.
1 parent bc4e7e4 commit d39ad2a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/telescope/actions/set.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ action_set.edit = function(prompt_bufnr, command)
220220
end
221221

222222
if row and col then
223+
if vim.api.nvim_buf_get_name(0) == filename then
224+
vim.cmd [[normal! m']]
225+
end
223226
local ok, err_msg = pcall(a.nvim_win_set_cursor, 0, { row, col })
224227
if not ok then
225228
log.debug("Failed to move to cursor:", err_msg, row, col)

0 commit comments

Comments
 (0)