summaryrefslogtreecommitdiff
path: root/script-beta/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-09 00:07:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-09 00:07:21 +0800
commit386f9ad25cd58dd7297b2725c9bd2bddc59fa936 (patch)
tree516d8ea232173516290243634871297df3213882 /script-beta/provider/provider.lua
parent4e7cdc47cc0f3b43ff62dee7f7c1b2d58a0e169c (diff)
downloadlua-language-server-386f9ad25cd58dd7297b2725c9bd2bddc59fa936.zip
加个 offsetOfWord
Diffstat (limited to 'script-beta/provider/provider.lua')
-rw-r--r--script-beta/provider/provider.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script-beta/provider/provider.lua b/script-beta/provider/provider.lua
index 8a8bcef6..410410c2 100644
--- a/script-beta/provider/provider.lua
+++ b/script-beta/provider/provider.lua
@@ -258,7 +258,7 @@ proto.on('textDocument/rename', function (params)
end
local lines = files.getLines(uri)
local text = files.getText(uri)
- local offset = define.offset(lines, text, params.position)
+ local offset = define.offsetOfWord(lines, text, params.position)
local result = core.rename(uri, offset, params.newName)
if not result then
return nil