Move event listener calls from resetDisplay to edit

Fixes #140
This commit is contained in:
Corey Johnson & Nathan Sobo
2013-04-24 11:29:46 -07:00
parent 2a6c4b04b1
commit 24ce415283
2 changed files with 20 additions and 8 deletions

View File

@@ -2575,3 +2575,15 @@ describe "Editor", ->
editor.on 'editor:will-be-removed', willBeRemovedHandler
editor.getPane().destroyActiveItem()
expect(willBeRemovedHandler).toHaveBeenCalled()
describe "when setInvisibles is toggled (regression)", ->
it "renders inserted newlines properly", ->
editor.setShowInvisibles(true)
editor.setCursorBufferPosition([0, 0])
editor.attachToDom(heightInLines: 20)
editor.setShowInvisibles(false)
editor.insertText("\n")
for rowNumber in [1..5]
expect(editor.lineElementForScreenRow(rowNumber).text()).toBe buffer.lineForRow(rowNumber)