Skip to content

Commit 2c77167

Browse files
committed
fix(utils): replace utils.open() with vim.open()
1 parent 22006e0 commit 2c77167

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

lua/orgmode/export/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function Export._exporter(cmd, target, on_success, on_error)
4242
label = 'Yes',
4343
key = 'y',
4444
action = function()
45-
return utils.open(target)
45+
return vim.ui.open(target)
4646
end,
4747
})
4848
menu:add_option({ label = 'No', key = 'n' })

lua/orgmode/utils/init.lua

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -96,23 +96,6 @@ function utils.system_notification(message)
9696
end
9797
end
9898

99-
function utils.open(target)
100-
if vim.fn.executable('xdg-open') == 1 then
101-
vim.system({ 'xdg-open', target }, { text = false })
102-
return 0
103-
end
104-
105-
if vim.fn.executable('open') == 1 then
106-
vim.system({ 'open', target }, { text = false })
107-
return 0
108-
end
109-
110-
if vim.fn.has('win32') == 1 then
111-
vim.system({ 'start', target }, { text = false })
112-
return 0
113-
end
114-
end
115-
11699
---@param msg string|table
117100
---@param additional_msg? table
118101
---@param store_in_history? boolean

0 commit comments

Comments
 (0)