Skip to content

Commit

Permalink
Merge pull request #137 from dmnd/polite-gutter
Browse files Browse the repository at this point in the history
Only widen the gutter when showGutter is enabled
  • Loading branch information
hd-deman committed Aug 5, 2014
2 parents f471d24 + fff2abd commit e54bc1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/linter-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class LinterView
@editorView = editorView
@statusBarView = statusBarView
@markers = null
@guttersShowing = false

@initLinters(linters)

Expand Down Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion stylesheets/linter.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@error-color: #b22222;
@warning-color: #DAA520;

.line-number {
.gutter.linter-gutter-enabled .line-number {
&:before {
visibility: hidden;
position: relative;
Expand Down

0 comments on commit e54bc1c

Please sign in to comment.