diff --git a/lua/orgmode/export/init.lua b/lua/orgmode/export/init.lua index efc5b0d13..c303ef85e 100644 --- a/lua/orgmode/export/init.lua +++ b/lua/orgmode/export/init.lua @@ -42,7 +42,7 @@ function Export._exporter(cmd, target, on_success, on_error) label = 'Yes', key = 'y', action = function() - return utils.open(target) + return vim.ui.open(target) end, }) menu:add_option({ label = 'No', key = 'n' }) diff --git a/lua/orgmode/utils/init.lua b/lua/orgmode/utils/init.lua index 109c36ce8..321444cc4 100644 --- a/lua/orgmode/utils/init.lua +++ b/lua/orgmode/utils/init.lua @@ -94,23 +94,6 @@ function utils.system_notification(message) end end -function utils.open(target) - if vim.fn.executable('xdg-open') == 1 then - vim.system({ 'xdg-open', target }, { text = false }) - return 0 - end - - if vim.fn.executable('open') == 1 then - vim.system({ 'open', target }, { text = false }) - return 0 - end - - if vim.fn.has('win32') == 1 then - vim.system({ 'start', target }, { text = false }) - return 0 - end -end - ---@param msg string|table ---@param additional_msg? table ---@param store_in_history? boolean