diff options
-rw-r--r-- | runtime/lua/vim/ui.lua | 6 | ||||
-rw-r--r-- | test/functional/lua/ui_spec.lua | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/runtime/lua/vim/ui.lua b/runtime/lua/vim/ui.lua index 25ced18daf..157b1461c3 100644 --- a/runtime/lua/vim/ui.lua +++ b/runtime/lua/vim/ui.lua @@ -143,12 +143,12 @@ function M.open(path) else return nil, 'vim.ui.open: rundll32 not found' end - elseif vim.fn.executable('wslview') == 1 then - cmd = { 'wslview', path } + elseif vim.fn.executable('explorer.exe') == 1 then + cmd = { 'explorer.exe', path } elseif vim.fn.executable('xdg-open') == 1 then cmd = { 'xdg-open', path } else - return nil, 'vim.ui.open: no handler found (tried: wslview, xdg-open)' + return nil, 'vim.ui.open: no handler found (tried: explorer.exe, xdg-open)' end local rv = vim.system(cmd, { text = true, detach = true }):wait() diff --git a/test/functional/lua/ui_spec.lua b/test/functional/lua/ui_spec.lua index b3057068fe..e769843b19 100644 --- a/test/functional/lua/ui_spec.lua +++ b/test/functional/lua/ui_spec.lua @@ -152,7 +152,7 @@ describe('vim.ui', function() vim.fn.executable = function() return 0 end ]] eq( - 'vim.ui.open: no handler found (tried: wslview, xdg-open)', + 'vim.ui.open: no handler found (tried: explorer.exe, xdg-open)', exec_lua [[local _, err = vim.ui.open('foo') ; return err]] ) end) |