mirror of
https://github.com/atom/atom.git
synced 2026-02-17 01:51:54 -05:00
Only clear linesToMeasure when we have actually measured
Previously, as soon as we decided to render linesToMeasure, we would clear them out. However, if a second update interleaved with the update that initially requested measurement, it could cause the requested lines to not be present when the measurement phase from the first update occurred. Now, any additional updates will only add to the set of lines that need to be measured until the measurement phase actually happens. Signed-off-by: Antonio Scandurra <as-cii@github.com>
This commit is contained in:
committed by
Antonio Scandurra
parent
da2c3fb56b
commit
c626836b2e
@@ -32,6 +32,10 @@ class TextEditorComponent {
|
||||
etch.setScheduler(scheduler)
|
||||
}
|
||||
|
||||
static getScheduler () {
|
||||
return etch.getScheduler()
|
||||
}
|
||||
|
||||
static didUpdateStyles () {
|
||||
if (this.attachedComponents) {
|
||||
this.attachedComponents.forEach((component) => {
|
||||
@@ -389,6 +393,7 @@ class TextEditorComponent {
|
||||
this.pendingAutoscroll = null
|
||||
}
|
||||
|
||||
this.linesToMeasure.clear()
|
||||
this.measuredContent = true
|
||||
}
|
||||
|
||||
@@ -848,7 +853,6 @@ class TextEditorComponent {
|
||||
this.extraRenderedScreenLines.set(row, screenLine)
|
||||
}
|
||||
})
|
||||
this.linesToMeasure.clear()
|
||||
}
|
||||
|
||||
queryLineNumbersToRender () {
|
||||
|
||||
Reference in New Issue
Block a user