summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-28 14:37:12 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-28 14:37:12 +0800
commit6772d374dae53b5d43ea0354635fd37f26618d6f (patch)
tree5782a52de24599201250745dce2a90dfba11c465
parent84cc3ccc4ef1408299801a3fd24f9fd482f061e0 (diff)
downloadlua-language-server-6772d374dae53b5d43ea0354635fd37f26618d6f.zip
fix #580
-rw-r--r--changelog.md3
-rw-r--r--script/core/command/removeSpace.lua5
2 files changed, 5 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md
index 5e8a86d3..857f685f 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,8 @@
# changelog
+## 2.0.5
+* `FIX` [#580](https://github.com/sumneko/lua-language-server/issues/580)
+
## 2.0.4
`2021-6-25`
* `FIX` [#550](https://github.com/sumneko/lua-language-server/issues/550)
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