Fix gutter width

When you had a 1000 line file and you fold everything
into 10 lines, it would make the gutter width only large
enough for the 10 lines, so line 999 wouldnt properly
fit in the gutter.

Refs #2423
This commit is contained in:
Ben Ogle
2014-06-11 17:28:12 -07:00
parent 01b4ff24b9
commit 1bdf45f7d6

View File

@@ -41,7 +41,7 @@ EditorComponent = React.createClass
render: ->
{focused, fontSize, lineHeight, fontFamily, showIndentGuide, showInvisibles, visible} = @state
{editor, cursorBlinkPeriod, cursorBlinkResumeDelay} = @props
maxLineNumberDigits = editor.getScreenLineCount().toString().length
maxLineNumberDigits = editor.getLineCount().toString().length
invisibles = if showInvisibles then @state.invisibles else {}
hasSelection = editor.getSelection()? and !editor.getSelection().isEmpty()