diff options
author | CppCXY <812125110@qq.com> | 2022-01-20 10:41:49 +0800 |
---|---|---|
committer | CppCXY <812125110@qq.com> | 2022-01-20 10:41:49 +0800 |
commit | 53d65c5783ca01a6e8b7bbf33804a154922cf6db (patch) | |
tree | 6bc86533b65c4ecf1e2156e29140c024a79e24a3 /script/core | |
parent | c875b7a3c05e12559f894cb30dcf292343d6a679 (diff) | |
download | lua-language-server-53d65c5783ca01a6e8b7bbf33804a154922cf6db.zip |
修复错误
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/type-formatting.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/script/core/type-formatting.lua b/script/core/type-formatting.lua index 951337d7..af27fe06 100644 --- a/script/core/type-formatting.lua +++ b/script/core/type-formatting.lua @@ -78,10 +78,10 @@ local function checkSplitOneLine(results, uri, position, ch) -- for _, edit in ipairs(edits) do -- results[#results+1] = edit -- end - + local pos = converter.packPosition(uri, position) local text = files.getText(uri) local status, formattedText, startLine, endLine = code_format.range_format( - uri, text, position.line - 1, position.line) + uri, text, pos.line - 1, pos.line) if not status then if formattedText ~= nil then |