diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-18 16:27:08 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-18 16:27:08 +0800 |
commit | e652c6d395d68ab07f6aef6b4ea988342b76b410 (patch) | |
tree | a3efdfeaf1f620bf56fc3e3988efa348cddef405 /script/files.lua | |
parent | 068c105b3347f37da940e61bcd7daa7e3d7d5a03 (diff) | |
download | lua-language-server-e652c6d395d68ab07f6aef6b4ea988342b76b410.zip |
close #387 source coding supports `ansi`
Diffstat (limited to 'script/files.lua')
-rw-r--r-- | script/files.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script/files.lua b/script/files.lua index 8a94cc22..f460f350 100644 --- a/script/files.lua +++ b/script/files.lua @@ -1,4 +1,5 @@ local platform = require 'bee.platform' +local unicode = require 'bee.unicode' local config = require 'config' local glob = require 'glob' local furi = require 'file-uri' @@ -153,6 +154,11 @@ function m.setText(uri, text, isTrust) if file.trusted and not isTrust then return end + if not isTrust then + if config.config.runtime.sourceCoding == 'ansi' then + text = unicode.a2u(text) + end + end if file.originText == text then return end |