mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2025-12-06 06:46:10 +00:00
fix(current_buffer_fuzzy_find): push cursor on edit (#3219)
Setting `push_cursor_on_edit = true` wasn't actually doing anything as the picker replaces `select_default`. Instead, call `normal! m'` manually in the replacement `select_default`.
This commit is contained in:
@@ -567,13 +567,13 @@ files.current_buffer_fuzzy_find = function(opts)
|
|||||||
|
|
||||||
actions.close(prompt_bufnr)
|
actions.close(prompt_bufnr)
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
|
vim.cmd "normal! m'"
|
||||||
vim.api.nvim_win_set_cursor(0, { selection.lnum, first_col })
|
vim.api.nvim_win_set_cursor(0, { selection.lnum, first_col })
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
push_cursor_on_edit = true,
|
|
||||||
})
|
})
|
||||||
:find()
|
:find()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user