Fix callback cancelation

This commit is contained in:
Zachary Yedidia 2020-01-30 18:04:17 -05:00
parent 59146cabb1
commit 46c5a81b0d
2 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -133,14 +133,14 @@ function onSave(bp)
end
function lint(buf, linter, cmd, args, errorformat, loff, coff, callback)
buf:ClearMessages(linter)
if callback ~= nil then
if callback(buf) then
if not callback(buf) then
return
end
end
buf:ClearMessages(linter)
shell.JobSpawn(cmd, args, "", "", "linter.onExit", buf, linter, errorformat, loff, coff)
end