mirror of
https://github.com/atom/atom.git
synced 2026-01-27 07:47:58 -05:00
Always update twice assuming we may need to measure
This prepares the ground for measuring absoltue cursor positions.
This commit is contained in:
committed by
Antonio Scandurra
parent
583c2c537d
commit
43386b0483
@@ -54,15 +54,16 @@ class TextEditorComponent {
|
||||
if (this.staleMeasurements.editorDimensions) this.measureEditorDimensions()
|
||||
|
||||
const longestLine = this.getLongestScreenLine()
|
||||
let measureLongestLine = false
|
||||
if (longestLine !== this.previousLongestLine) {
|
||||
this.longestLineToMeasure = longestLine
|
||||
etch.updateSync(this)
|
||||
this.measureLongestLineWidth()
|
||||
this.previousLongestLine = longestLine
|
||||
etch.updateSync(this)
|
||||
} else {
|
||||
etch.updateSync(this)
|
||||
measureLongestLine = true
|
||||
}
|
||||
|
||||
etch.updateSync(this)
|
||||
if (measureLongestLine) this.measureLongestLineWidth()
|
||||
etch.updateSync(this)
|
||||
}
|
||||
|
||||
render () {
|
||||
|
||||
Reference in New Issue
Block a user