summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-08-18 20:04:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-08-18 20:04:18 +0800
commit8455ed7b3734e8648a4a542eb26575c7085466b8 (patch)
tree1e321b89dd5cd2949359ed0f656b049b7e4c8ad1
parent38d46faae20bbdbc3578452f020276766aed67e0 (diff)
downloadlua-language-server-8455ed7b3734e8648a4a542eb26575c7085466b8.zip
Drive letter is always uppercase
-rw-r--r--script/file-uri.lua2
-rw-r--r--test/crossfile/completion.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/script/file-uri.lua b/script/file-uri.lua
index add3a73c..88281ca2 100644
--- a/script/file-uri.lua
+++ b/script/file-uri.lua
@@ -78,7 +78,7 @@ function m.decode(uri)
if scheme == 'file' and #authority > 0 and #path > 1 then
value = '//' .. authority .. path
elseif path:match '/%a:' then
- value = path:sub(2, 2) .. path:sub(3)
+ value = path:sub(2, 2):upper() .. path:sub(3)
else
value = path
end
diff --git a/test/crossfile/completion.lua b/test/crossfile/completion.lua
index 84d31544..d393c8e8 100644
--- a/test/crossfile/completion.lua
+++ b/test/crossfile/completion.lua
@@ -392,12 +392,12 @@ config.set('Lua.runtime.path', originRuntimePath)
local originRuntimePath = config.get 'Lua.runtime.path'
config.set('Lua.runtime.path', {
- 'd:/?/1.lua',
+ 'D:/?/1.lua',
})
TEST {
{
- path = 'd:/xxxx/1.lua',
+ path = 'D:/xxxx/1.lua',
content = '',
},
{