diff options
-rw-r--r-- | changelog.md | 3 | ||||
-rw-r--r-- | script/core/command/removeSpace.lua | 5 |
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 |