fix: Fix insertion

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

View File

@ -320,17 +320,22 @@ 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.cmd("bprevious")
vim.schedule(function()
local cursor = vim.api.nvim_win_get_cursor(0)
vim.api.nvim_buf_set_text( vim.api.nvim_buf_set_text(
self.previous_buffer,
0,
0,
0,
0, 0,
cursor[1] - 1,
cursor[2],
cursor[1] - 1,
cursor[2],
markdown_table markdown_table
) )
end) end)
end)
end, end,
{} {}
) )