mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge branch 'master' into as-double-reflow-measurements
# Conflicts: # src/text-editor-presenter.coffee
This commit is contained in:
@@ -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", ->
|
||||
|
||||
Reference in New Issue
Block a user