diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-28 14:58:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-28 14:58:49 +0800 |
commit | deaf17c3d358085dcf9b8c4cf014b83daf5bf149 (patch) | |
tree | ac5815490f13692b7ad3b1d55560c85f6c498eb1 /server | |
parent | 2a5d1448e745355a8e7b0ac837193b781784e5b1 (diff) | |
download | lua-language-server-deaf17c3d358085dcf9b8c4cf014b83daf5bf149.zip |
修正字符串后的后置空格判断不正确的问题
Diffstat (limited to 'server')
-rw-r--r-- | server/src/core/diagnostics.lua | 2 | ||||
-rw-r--r-- | server/src/method/workspace/executeCommand.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua index c0c991bb..a43cbf2f 100644 --- a/server/src/core/diagnostics.lua +++ b/server/src/core/diagnostics.lua @@ -106,7 +106,7 @@ function mt:searchUnusedLabel(callback) end local function isContainPos(obj, start, finish) - if obj.start <= start and obj.finish + 1 >= finish then + if obj.start <= start and obj.finish >= finish then return true end return false diff --git a/server/src/method/workspace/executeCommand.lua b/server/src/method/workspace/executeCommand.lua index 49fc6ee7..9643128e 100644 --- a/server/src/method/workspace/executeCommand.lua +++ b/server/src/method/workspace/executeCommand.lua @@ -6,7 +6,7 @@ local rpc = require 'rpc' local command = {} local function isContainPos(obj, start, finish) - if obj.start <= start and obj.finish + 1 >= finish then + if obj.start <= start and obj.finish >= finish then return true end return false |