summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/newline-call.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/diagnostics/newline-call.lua')
-rw-r--r--script/core/diagnostics/newline-call.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/core/diagnostics/newline-call.lua b/script/core/diagnostics/newline-call.lua
index 6460d3a7..2ba2ce03 100644
--- a/script/core/diagnostics/newline-call.lua
+++ b/script/core/diagnostics/newline-call.lua
@@ -2,6 +2,7 @@ local files = require 'files'
local guide = require 'parser.guide'
local lang = require 'language'
local await = require 'await'
+local sub = require 'core.substring'
---@async
return function (uri, callback)
@@ -44,8 +45,8 @@ return function (uri, callback)
start = node.start,
finish = args.finish,
message = lang.script('DIAG_PREVIOUS_CALL'
- , text:sub(node.start, node.finish)
- , text:sub(args.start, args.finish)
+ , sub(state)(node.start + 1, node.finish)
+ , sub(state)(args.start + 1, args.finish)
),
}
end