Skip to content
This repository was archived by the owner on Sep 5, 2022. It is now read-only.

Commit 47924c6

Browse files
committed
making sure all workspaces can lint
1 parent 2fe22e2 commit 47924c6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/main.coffee

+8-4
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ module.exports =
1212
atom.commands.add "atom-workspace", "htmlhint:hint", linter
1313
atom.config.observe "htmlhint.validateOnSave", (value) ->
1414
if value is true
15-
editor.buffer.on "saved", linter
15+
atom.workspace.eachEditor (editor) ->
16+
editor.buffer.on "saved", linter
1617
else
17-
editor.buffer.off "saved", linter
18+
atom.workspace.eachEditor (editor) ->
19+
editor.buffer.off "saved", linter
1820

1921
atom.config.observe "htmlhint.validateOnChange", (value) ->
2022
if value is true
21-
editor.buffer.on "contents-modified", linter
23+
atom.workspace.eachEditor (editor) ->
24+
editor.buffer.on "contents-modified", linter
2225
else
23-
editor.buffer.off "contents-modified", linter
26+
atom.workspace.eachEditor (editor) ->
27+
editor.buffer.off "contents-modified", linter

0 commit comments

Comments
 (0)