diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-10-17 16:38:44 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-10-17 16:38:44 +0800 |
commit | bfb576d3eba9f12bb582a9f7e942c5eac387fe2b (patch) | |
tree | d5e3790aeca21994d4b9558453f40657383fcf63 /script/core/command/removeSpace.lua | |
parent | 3bdd74aa30a6175f1bbf973559241f99eb563dfe (diff) | |
download | lua-language-server-bfb576d3eba9f12bb582a9f7e942c5eac387fe2b.zip |
use `state` instead of `uri` for converter
The state may have changed when responding, so we need to use the state when requesting.
Try not to get the state on the spot.
Diffstat (limited to 'script/core/command/removeSpace.lua')
-rw-r--r-- | script/core/command/removeSpace.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/command/removeSpace.lua b/script/core/command/removeSpace.lua index 992a0705..87d11fff 100644 --- a/script/core/command/removeSpace.lua +++ b/script/core/command/removeSpace.lua @@ -38,7 +38,7 @@ return function (data) end local firstPos = guide.offsetToPosition(state, firstOffset) - 1 textEdit[#textEdit+1] = { - range = converter.packRange(uri, firstPos, lastPos), + range = converter.packRange(state, firstPos, lastPos), newText = '', } |