fix(actions.insert_symbol): schedule to insert at correct position (#3218)

This commit is contained in:
James Trew
2024-07-24 01:23:46 +00:00
committed by GitHub
parent 79552ef848
commit d54578395a

View File

@@ -488,7 +488,9 @@ end
actions.insert_symbol = function(prompt_bufnr) actions.insert_symbol = function(prompt_bufnr)
local symbol = action_state.get_selected_entry().value[1] local symbol = action_state.get_selected_entry().value[1]
actions.close(prompt_bufnr) actions.close(prompt_bufnr)
vim.schedule(function()
vim.api.nvim_put({ symbol }, "", true, true) vim.api.nvim_put({ symbol }, "", true, true)
end)
end end
--- Insert a symbol into the current buffer and keeping the insert mode. --- Insert a symbol into the current buffer and keeping the insert mode.