diff --git a/lib/linter-view.coffee b/lib/linter-view.coffee index 699ef018..b62e26c6 100644 --- a/lib/linter-view.coffee +++ b/lib/linter-view.coffee @@ -25,6 +25,7 @@ class LinterView @editorView = editorView @statusBarView = statusBarView @markers = null + @guttersShowing = false @initLinters(linters) @@ -145,6 +146,13 @@ class LinterView display: -> @destroyMarkers() + if @showGutters and not @guttersShowing + @guttersShowing = true + @editorView.gutter.addClass("linter-gutter-enabled") + else if not @showGutters and @guttersShowing + @guttersShowing = false + @editorView.gutter.removeClass("linter-gutter-enabled") + @markers ?= [] for message in @messages klass = if message.level == 'error' diff --git a/stylesheets/linter.less b/stylesheets/linter.less index c3c10196..80e40088 100644 --- a/stylesheets/linter.less +++ b/stylesheets/linter.less @@ -11,7 +11,7 @@ @error-color: #b22222; @warning-color: #DAA520; -.line-number { +.gutter.linter-gutter-enabled .line-number { &:before { visibility: hidden; position: relative;