diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-08-19 12:00:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-19 12:00:43 +0800 |
commit | 82af2563d568b087bd0059f00d8178dd92af7324 (patch) | |
tree | e122c1d88abe97d478ce27a4238a8cdada93aa43 | |
parent | b41adb33c37781bd3bcf596dc510263973b85c70 (diff) | |
parent | 3a34b724f138ccd545cd9354d5e090d2c76789c2 (diff) | |
download | lua-language-server-82af2563d568b087bd0059f00d8178dd92af7324.zip |
Merge branch 'master' into dev
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/provider/provider.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index 9397be2c..590d38ee 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ <!-- Add all new changes here. They will be moved under a version at release --> * `NEW` using `enum (partial)`, it suggests all fields with the same `enum` type rather than just the fields from the current table. * `NEW` When using `enum["<key>" or <index>]`, undefined fields will raise an 'undefined' error. +* `FIX` Renaming files in the directory leads to the auto-correction in "require" adding extra characters. ## 3.10.4 `2024-8-16` diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 6a4b2406..3d1c5d52 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -222,7 +222,7 @@ m.register 'workspace/didRenameFiles' { for _, uri in ipairs(childs) do if files.exists(uri) then local ouri = uri - local tail = ouri:sub(#oldUri) + local tail = ouri:sub(#oldUri + 1) local nuri = file.newUri .. tail renames[#renames+1] = { oldUri = ouri, |