fix: Fix insertion

This commit is contained in:
Myzel394 2023-10-06 21:59:05 +02:00
parent f5a9a3cdcf
commit 34012f9096

View File

@ -320,16 +320,21 @@ function M:register_listeners()
function() function()
local markdown_table = export:export_table(self.table) local markdown_table = export:export_table(self.table)
self:close()
vim.schedule(function() vim.schedule(function()
vim.api.nvim_buf_set_text( vim.cmd("bprevious")
self.previous_buffer,
0, vim.schedule(function()
0, local cursor = vim.api.nvim_win_get_cursor(0)
0,
0, vim.api.nvim_buf_set_text(
markdown_table 0,
) cursor[1] - 1,
cursor[2],
cursor[1] - 1,
cursor[2],
markdown_table
)
end)
end) end)
end, end,
{} {}