mirror of
https://github.com/atom/atom.git
synced 2026-02-10 22:55:09 -05:00
Constrain line/line number decoration update to rendered rows
This commit is contained in:
committed by
Antonio Scandurra
parent
eacf0d8f64
commit
3101e28459
@@ -449,8 +449,11 @@ class TextEditorComponent {
|
||||
}
|
||||
}
|
||||
|
||||
startRow = Math.max(startRow, this.getRenderedStartRow())
|
||||
endRow = Math.min(endRow, this.getRenderedEndRow() - 1)
|
||||
|
||||
for (let row = startRow; row <= endRow; row++) {
|
||||
if (omitLastRow && row === endRow) break
|
||||
if (omitLastRow && row === screenRange.end.row) break
|
||||
const currentClassName = decorationsByRow.get(row)
|
||||
const newClassName = currentClassName ? currentClassName + ' ' + decoration.class : decoration.class
|
||||
decorationsByRow.set(row, newClassName)
|
||||
|
||||
Reference in New Issue
Block a user