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:
James Trew
2024-07-24 03:22:00 +00:00
committed by GitHub
parent d54578395a
commit bc4e7e4503

View File

@@ -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