diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-11 19:48:51 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-11 19:48:51 +0800 |
commit | b6ca9b20db4a7b28a4e0adb7f8b24da4356e45a7 (patch) | |
tree | 878f9f044e56bc86e61b6a1eb941878d44773612 /server-beta/src/proto | |
parent | b7742d3bd46bd1ff8d4cce0d6c0f36ea8098a51b (diff) | |
download | lua-language-server-b6ca9b20db4a7b28a4e0adb7f8b24da4356e45a7.zip |
修正坐标转换的bug
Diffstat (limited to 'server-beta/src/proto')
-rw-r--r-- | server-beta/src/proto/define.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server-beta/src/proto/define.lua b/server-beta/src/proto/define.lua index 62c85989..9a890e2e 100644 --- a/server-beta/src/proto/define.lua +++ b/server-beta/src/proto/define.lua @@ -47,7 +47,9 @@ function m.range(lines, text, offset1, offset2) start = m.position(lines, text, offset1), ['end'] = m.position(lines, text, offset2), } - range.start.character = range.start.character - 1 + if range.start.character > 0 then + range.start.character = range.start.character - 1 + end return range end |