Merge branch 'master' into as-double-reflow-measurements

# Conflicts:
#	src/text-editor-presenter.coffee
This commit is contained in:
Antonio Scandurra
2015-09-18 09:02:50 +02:00
58 changed files with 150 additions and 24 deletions

View File

@@ -418,6 +418,24 @@ describe "TextEditorComponent", ->
expect(leafNodes[0].classList.contains('trailing-whitespace')).toBe true
expect(leafNodes[0].classList.contains('leading-whitespace')).toBe false
it "keeps rebuilding lines when continuous reflow is on", ->
wrapperNode.setContinuousReflow(true)
oldLineNodes = componentNode.querySelectorAll(".line")
advanceClock(10)
expect(nextAnimationFrame).toBe(noAnimationFrame)
advanceClock(component.presenter.minimumReflowInterval - 10)
nextAnimationFrame()
newLineNodes = componentNode.querySelectorAll(".line")
expect(oldLineNodes).not.toEqual(newLineNodes)
wrapperNode.setContinuousReflow(false)
advanceClock(component.presenter.minimumReflowInterval)
expect(nextAnimationFrame).toBe(noAnimationFrame)
describe "when showInvisibles is enabled", ->
invisibles = null
@@ -855,6 +873,24 @@ describe "TextEditorComponent", ->
expect(componentNode.querySelector('.gutter').style.display).toBe ''
expect(component.lineNumberNodeForScreenRow(3)?).toBe true
it "keeps rebuilding line numbers when continuous reflow is on", ->
wrapperNode.setContinuousReflow(true)
oldLineNodes = componentNode.querySelectorAll(".line-number")
advanceClock(10)
expect(nextAnimationFrame).toBe(noAnimationFrame)
advanceClock(component.presenter.minimumReflowInterval - 10)
nextAnimationFrame()
newLineNodes = componentNode.querySelectorAll(".line-number")
expect(oldLineNodes).not.toEqual(newLineNodes)
wrapperNode.setContinuousReflow(false)
advanceClock(component.presenter.minimumReflowInterval)
expect(nextAnimationFrame).toBe(noAnimationFrame)
describe "fold decorations", ->
describe "rendering fold decorations", ->
it "adds the foldable class to line numbers when the line is foldable", ->