mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Maintain a map of line components instead of line nodes and text nodes
Other than simplifying the code, this will help us understand whether https://github.com/atom/atom/issues/15263 might be related to a node reuse issue. Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
committed by
Nathan Sobo
parent
eaf358bd3e
commit
74ae169fcc
@@ -4225,12 +4225,12 @@ function lineNumberNodeForScreenRow (component, row) {
|
||||
|
||||
function lineNodeForScreenRow (component, row) {
|
||||
const renderedScreenLine = component.renderedScreenLineForRow(row)
|
||||
return component.lineNodesByScreenLineId.get(renderedScreenLine.id)
|
||||
return component.lineComponentsByScreenLineId.get(renderedScreenLine.id).element
|
||||
}
|
||||
|
||||
function textNodesForScreenRow (component, row) {
|
||||
const screenLine = component.renderedScreenLineForRow(row)
|
||||
return component.textNodesByScreenLineId.get(screenLine.id)
|
||||
return component.lineComponentsByScreenLineId.get(screenLine.id).textNodes
|
||||
}
|
||||
|
||||
function setScrollTop (component, scrollTop) {
|
||||
|
||||
Reference in New Issue
Block a user