diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-28 14:37:12 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-28 14:37:12 +0800 |
commit | 6772d374dae53b5d43ea0354635fd37f26618d6f (patch) | |
tree | 5782a52de24599201250745dce2a90dfba11c465 /script | |
parent | 84cc3ccc4ef1408299801a3fd24f9fd482f061e0 (diff) | |
download | lua-language-server-6772d374dae53b5d43ea0354635fd37f26618d6f.zip |
fix #580
Diffstat (limited to 'script')
-rw-r--r-- | script/core/command/removeSpace.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/script/core/command/removeSpace.lua b/script/core/command/removeSpace.lua index 6fb9669f..2ef178f3 100644 --- a/script/core/command/removeSpace.lua +++ b/script/core/command/removeSpace.lua @@ -1,5 +1,4 @@ local files = require 'files' -local searcher = require 'core.searcher' local guide = require 'parser.guide' local proto = require 'proto' local lang = require 'language' @@ -23,10 +22,10 @@ return function (data) local textEdit = {} for i = 1, #lines do - local line = searcher.lineContent(lines, text, i, true) + local line = guide.lineContent(lines, text, i, true) local pos = line:find '[ \t]+$' if pos then - local start, finish = searcher.lineRange(lines, i, true) + local start, finish = guide.lineRange(lines, i, true) start = start + pos - 1 if isInString(ast, start) then goto NEXT_LINE |