Make all lines visible if no external client height is assigned

This commit is contained in:
Nathan Sobo
2015-01-19 15:39:51 -07:00
parent ac463143dd
commit 7095ccd32b
2 changed files with 9 additions and 1 deletions

View File

@@ -58,7 +58,7 @@ class TextEditorPresenter
getEndRow: ->
startRow = @getStartRow()
visibleLinesCount = Math.ceil(@clientHeight / @lineHeight) + 1
visibleLinesCount = Math.ceil(@getClientHeight() / @lineHeight) + 1
overdrawMargin = @lineOverdrawMargin + Math.min(@lineOverdrawMargin, startRow)
endRow = startRow + visibleLinesCount + overdrawMargin
Math.min(@model.getScreenLineCount(), endRow)
@@ -74,6 +74,9 @@ class TextEditorPresenter
setClientHeight: (@clientHeight) ->
@updateLinesState()
getClientHeight: ->
@clientHeight ? @model.getScreenLineCount() * @lineHeight
setClientWidth: (@clientWidth) ->
@updateLinesState()