summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanSharp <steinmeister36@gmail.com>2024-06-18 21:29:23 +0200
committerJanSharp <steinmeister36@gmail.com>2024-06-18 21:46:54 +0200
commite21402aa4165f5dbddfef8bd97ff66bfbd8938b1 (patch)
treea7cc74752e28d75f387862fe9c6b71137d4a7c4a
parent85cb44556575f81a31267fe3c443822f3e97699e (diff)
downloadlua-language-server-e21402aa4165f5dbddfef8bd97ff66bfbd8938b1.zip
Fix plugin arg arrays when paths contain numbers
Specifically to prevent it from trying to match the tostring-ed numeric number keys of plain arrays with config folder paths, which can lead to false positives if those paths contain numbers and then ultimately results in only a single argument out of the arguments array being passed along
-rw-r--r--script/plugin.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/plugin.lua b/script/plugin.lua
index 80179633..b8ecfb6a 100644
--- a/script/plugin.lua
+++ b/script/plugin.lua
@@ -156,7 +156,7 @@ local function initPlugin(uri)
end
for i, pluginConfigPath in ipairs(pluginConfigPaths) do
local myArgs = args
- if args then
+ if args and not args[1] then
for k, v in pairs(args) do
if pluginConfigPath:find(k, 1, true) then
myArgs = v