aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/handlers.lua
diff options
context:
space:
mode:
authorlvimuser <109605931+lvimuser@users.noreply.github.com>2022-10-30 06:35:22 -0300
committerGitHub <noreply@github.com>2022-10-30 02:35:22 -0700
commite0dff29adc7690bb693ff05ff8776d07e756d4f9 (patch)
treee298e35fe5f00c0f081651108e10c8787d523e93 /runtime/lua/vim/lsp/handlers.lua
parentcf0f53037cff8bc3d1c0d523b98582e6d47a50df (diff)
downloadrneovim-e0dff29adc7690bb693ff05ff8776d07e756d4f9.tar.gz
rneovim-e0dff29adc7690bb693ff05ff8776d07e756d4f9.tar.bz2
rneovim-e0dff29adc7690bb693ff05ff8776d07e756d4f9.zip
fix(lsp/window_showDocument): correctly handle external resources #20867
- since cmd is a list, it runs directly ('no shell') and we shouldn't escape. - typo: shellerror -> shell_error
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r--runtime/lua/vim/lsp/handlers.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua
index 93fd621161..c648a53555 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -519,15 +519,15 @@ M['window/showDocument'] = function(_, result, ctx, _)
-- TODO(lvimuser): ask the user for confirmation
local cmd
if vim.fn.has('win32') == 1 then
- cmd = { 'cmd.exe', '/c', 'start', '""', vim.fn.shellescape(uri) }
+ cmd = { 'cmd.exe', '/c', 'start', '""', uri }
elseif vim.fn.has('macunix') == 1 then
- cmd = { 'open', vim.fn.shellescape(uri) }
+ cmd = { 'open', uri }
else
- cmd = { 'xdg-open', vim.fn.shellescape(uri) }
+ cmd = { 'xdg-open', uri }
end
local ret = vim.fn.system(cmd)
- if vim.v.shellerror ~= 0 then
+ if vim.v.shell_error ~= 0 then
return {
success = false,
error = {