Replace calls to renderLines w/ resetDisplay in Editor

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-11-13 17:21:27 -07:00
parent cef9ce6ca7
commit 041dc2b6b0
2 changed files with 3 additions and 7 deletions

View File

@@ -1802,7 +1802,7 @@ describe "Editor", ->
describe "when a selected fold is scrolled into view (and the fold line was not previously rendered)", ->
it "renders the fold's line element with the 'selected' class", ->
setEditorHeightInLines(editor, 5)
editor.renderLines() # re-render lines so certain lines are not rendered
editor.resetDisplay()
editor.createFold(2, 4)
editor.setSelectedBufferRange([[1, 0], [5, 0]], preserveFolds: true)

View File

@@ -277,10 +277,10 @@ class Editor extends View
setShowInvisibles: (showInvisibles) ->
return if showInvisibles == @showInvisibles
@showInvisibles = showInvisibles
@renderLines()
@resetDisplay()
setInvisibles: (@invisibles={}) ->
@renderLines()
@resetDisplay()
checkoutHead: -> @getBuffer().checkoutHead()
setText: (text) -> @getBuffer().setText(text)
@@ -737,10 +737,6 @@ class Editor extends View
@overlayer.css('min-width', minWidth)
@layerMinWidth = minWidth
renderLines: ->
@clearRenderedLines()
@updateDisplay()
clearRenderedLines: ->
@renderedLines.empty()
@firstRenderedScreenRow = null