     iconHTML = '<div class="icon-right"></div>'
     padding + lineNumber + iconHTML
 
-  updateLineNumberNode: (lineNumberId, screenRow) ->
+  updateLineNumberNode: (lineNumberId, bufferRow, screenRow, softWrapped) ->
+    node = @lineNumberNodesById[lineNumberId]
+
+    @toggleClass node, 'foldable', not softWrapped and @props.editor.isFoldableAtBufferRow(bufferRow)
+    @toggleClass node, 'folded', @props.editor.isFoldedAtBufferRow(bufferRow)
+
     unless @screenRowsByLineNumberId[lineNumberId] is screenRow
       {lineHeightInPixels} = @props
-      @lineNumberNodesById[lineNumberId].style.top = screenRow * lineHeightInPixels + 'px'
-      @lineNumberNodesById[lineNumberId].dataset.screenRow = screenRow
+      node.style.top = screenRow * lineHeightInPixels + 'px'
+      node.dataset.screenRow = screenRow
       @screenRowsByLineNumberId[lineNumberId] = screenRow
       @lineNumberIdsByScreenRow[screenRow] = lineNumberId
 

      style = "visibility: hidden;"
    innerHTML = @buildLineNumberInnerHTML(bufferRow, softWrapped, maxLineNumberDigits)

    "<div class=\"line-number\" style=\"#{style}\" data-buffer-row=\"#{bufferRow}\" data-screen-row=\"#{screenRow}\">#{innerHTML}</div>"

  buildLineNumberInnerHTML: (bufferRow, softWrapped, maxLineNumberDigits) ->
    if softWrapped


  lineNumberNodeForScreenRow: (screenRow) ->
    @lineNumberNodesById[@lineNumberIdsByScreenRow[screenRow]]

  toggleClass: (node, klass, condition) ->
    if condition then node.classList.add(klass) else node.classList.remove(klass)

