     @updateCursorPositionText()
 
   updateGrammarText: ->
-    grammar = @pane.viewForActiveItem().getGrammar?()
+    grammar = @pane.activeView.getGrammar?()
     if not grammar? or grammar is syntax.nullGrammar
       @grammarName.hide()
     else

      @updatePathText()

    @subscribe @pane, 'cursor:moved', => @updateCursorPositionText()
    @subscribe @grammarName, 'click', => @pane.viewForActiveItem().trigger 'grammar-selector:show'
    @subscribe @pane, 'editor:grammar-changed', => @updateGrammarText()

    if git?

      @currentPath.hide()

  updateCursorPositionText: ->
    if position = @pane.activeView.getCursorBufferPosition?()
      @cursorPosition.text("#{position.row + 1},#{position.column + 1}").show()
    else
      @cursorPosition.hide()
