summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/core/diagnostics.lua2
-rw-r--r--server/src/method/workspace/executeCommand.lua2
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