diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-07-06 18:24:22 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-07-06 18:24:22 +0800 |
commit | 764cc62a17af3cea9db5ae8bc695c9b9230841ac (patch) | |
tree | 99d36899d813d6f4a41a61f43bd10cc119d51f93 /script/proto/converter.lua | |
parent | 91524a855815c56deeb0246266ce1e18e31b070c (diff) | |
download | lua-language-server-764cc62a17af3cea9db5ae8bc695c9b9230841ac.zip |
fix supporting unicode in signature
Diffstat (limited to 'script/proto/converter.lua')
-rw-r--r-- | script/proto/converter.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/script/proto/converter.lua b/script/proto/converter.lua index a723face..e86e4904 100644 --- a/script/proto/converter.lua +++ b/script/proto/converter.lua @@ -207,6 +207,14 @@ function m.setOffsetEncoding(encoding) offsetEncoding = encoding:lower():gsub('%-', '') end +---@param s string +---@param i? integer +---@param j? integer +---@return integer +function m.len(s, i, j) + return encoder.len(offsetEncoding, s, i, j) +end + ---@class proto.command ---@field title string ---@field command string |