mirror of
https://github.com/neovim/neovim.git
synced 2025-12-08 15:42:52 +00:00
fix(ui.open): use "start" instead of deprecated "rundll32" #36731
Problem: The rundll32 utility is a leftover from Windows 95, and it has been deprecated since at least Windows Vista. Solution: Use the start command through Command Prompt instead.
This commit is contained in:
@@ -169,11 +169,7 @@ function M.open(path, opt)
|
||||
elseif vim.fn.has('mac') == 1 then
|
||||
cmd = { 'open', path }
|
||||
elseif vim.fn.has('win32') == 1 then
|
||||
if vim.fn.executable('rundll32') == 1 then
|
||||
cmd = { 'rundll32', 'url.dll,FileProtocolHandler', path }
|
||||
else
|
||||
return nil, 'vim.ui.open: rundll32 not found'
|
||||
end
|
||||
cmd = { 'cmd.exe', '/c', 'start', '', path }
|
||||
elseif vim.fn.executable('xdg-open') == 1 then
|
||||
cmd = { 'xdg-open', path }
|
||||
job_opt.stdout = false
|
||||
|
||||
Reference in New Issue
Block a user