diff options
Diffstat (limited to 'script/core/command/removeSpace.lua')
-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 d92fee79..3021d4a4 100644 --- a/script/core/command/removeSpace.lua +++ b/script/core/command/removeSpace.lua @@ -20,11 +20,10 @@ return function (data) return end - local lines = {} + local lines = state.lines local textEdit = {} for i = 0, #lines do - local startPos = lines[i] - local startOffset = guide.positionToOffset(state, startPos) + local startOffset = lines[i] local finishOffset = text:find('[\r\n]', startOffset) or (#text + 1) local lastOffset = finishOffset - 1 local lastChar = text:sub(lastOffset, lastOffset) |