diff options
-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, |