Fix problem with linter.onSave calling view.Save

Fixes #246
This commit is contained in:
Zachary Yedidia
2016-08-30 19:38:45 -04:00
parent b970b393f2
commit 13da5ced15
2 changed files with 7 additions and 3 deletions

View File

@@ -2,10 +2,14 @@ if GetOption("linter") == nil then
AddOption("linter", true)
end
MakeCommand("lint", "linter.runLinter", 0)
MakeCommand("lint", "linter.lintCommand", 0)
function lintCommand()
CurView():Save(false)
runLinter()
end
function runLinter()
CurView():Save(false)
local ft = CurView().Buf:FileType()
local file = CurView().Buf.Path
local devnull = "/dev/null"