diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-10-22 18:29:44 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-10-22 18:29:44 +0800 |
commit | 591a154c735c4c9fcb64bd16e5b845c496fdd676 (patch) | |
tree | 6bfa3e8a860025bbf7f72c04bef30f0b67ad4bd3 /script/files.lua | |
parent | 0c364067c6350e0c524e2f772f733b6ebb6f902c (diff) | |
download | lua-language-server-591a154c735c4c9fcb64bd16e5b845c496fdd676.zip |
stash
Diffstat (limited to 'script/files.lua')
-rw-r--r-- | script/files.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/script/files.lua b/script/files.lua index 566b012c..4d649b29 100644 --- a/script/files.lua +++ b/script/files.lua @@ -140,9 +140,8 @@ function m.setText(uri, text, isTrust, instance) return end if not isTrust then - if config.get 'Lua.runtime.fileEncoding' == 'ansi' then - text = encoder.ansi.decode(text) - end + local encoding = config.get 'Lua.runtime.fileEncoding' + text = encoder.decode(encoding, text) end if file.originText == text then return |