summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/trailing-space.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/diagnostics/trailing-space.lua')
-rw-r--r--script/core/diagnostics/trailing-space.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/diagnostics/trailing-space.lua b/script/core/diagnostics/trailing-space.lua
index 2e0398b2..1fdccf80 100644
--- a/script/core/diagnostics/trailing-space.lua
+++ b/script/core/diagnostics/trailing-space.lua
@@ -10,9 +10,10 @@ return function (uri, callback)
if not state or not text then
return
end
+ local delayer = await.newThrottledDelayer(5000)
local lines = state.lines
for i = 0, #lines do
- await.delay()
+ delayer:delay()
local startOffset = lines[i]
local finishOffset = text:find('[\r\n]', startOffset) or (#text + 1)
local lastOffset = finishOffset - 1