Style color of folded line numbers

This commit is contained in:
Kevin Sawicki
2013-01-30 11:48:58 -08:00
parent 4db876aed1
commit 8dbcefa932
6 changed files with 36 additions and 5 deletions

View File

@@ -58,16 +58,19 @@ class Gutter extends View
@renderLineNumbers(renderFrom, renderTo) if performUpdate
renderLineNumbers: (startScreenRow, endScreenRow) ->
rows = @editor().bufferRowsForScreenRows(startScreenRow, endScreenRow)
editor = @editor()
rows = editor.bufferRowsForScreenRows(startScreenRow, endScreenRow)
cursorScreenRow = @editor().getCursorScreenPosition().row
cursorScreenRow = editor.getCursorScreenPosition().row
@lineNumbers[0].innerHTML = $$$ ->
for row in rows
if row == lastScreenRow
rowValue = ''
else
rowValue = row + 1
@div {class: 'line-number'}, rowValue
classes = ['line-number']
classes.push('fold') if editor.isFoldedAtBufferRow(row)
@div rowValue, class: classes.join(' ')
lastScreenRow = row
@calculateWidth()