   # Enable or disable invisible character substitution for this editor.
   #
   # * `showInvisibles` A {Boolean}
-  setShowInvisibles: (showInvisibles) ->
-    return if showInvisibles is @showInvisibles
-    @showInvisibles = showInvisibles
-    @resetDisplayLayer()
+  setShowInvisibles: (showInvisibles) -> @update({showInvisibles})
 
   # Returns an {Object} representing the current invisible character
   # substitutions for this editor. See {::setInvisibles}.

  onDidChangeMini: (callback) ->
    @emitter.on 'did-change-mini', callback

  setLineNumberGutterVisible: (lineNumberGutterVisible) ->
    unless lineNumberGutterVisible is @lineNumberGutter.isVisible()
      if lineNumberGutterVisible
        @lineNumberGutter.show()
      else
        @lineNumberGutter.hide()
      @emitter.emit 'did-change-line-number-gutter-visible', @lineNumberGutter.isVisible()
    @lineNumberGutter.isVisible()

  isLineNumberGutterVisible: -> @lineNumberGutter.isVisible()



    @buffer ?= new TextBuffer
    @tokenizedBuffer ?= new TokenizedBuffer({
      grammar, tabLength, @buffer, @largeFileMode, @assert
    })
    @displayLayer ?= @buffer.addDisplayLayer()
    @displayLayer.setTextDecorationLayer(@tokenizedBuffer)
