Skip to content

Commit 78cc8ae

Browse files
committed
Make convert_to_python function sync
1 parent aa8fe3e commit 78cc8ae

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

lua/pyrepl/jupytext.lua

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,12 @@ function M.convert_to_python(buf)
8585
text = template
8686
end
8787

88-
vim.schedule(function()
89-
local ok, error = pcall(convert_text, text, name, false)
90-
if not ok then
91-
vim.notify(message .. "failed to run jupytext: " .. error, vim.log.levels.ERROR)
92-
else
93-
edit_relative(name)
94-
end
95-
end)
88+
local ok, error = pcall(convert_text, text, name, false)
89+
if not ok then
90+
vim.notify(message .. "failed to run jupytext: " .. error, vim.log.levels.ERROR)
91+
else
92+
edit_relative(name)
93+
end
9694
end
9795

9896
vim.ui.select(choices, {

0 commit comments

Comments
 (0)