mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
🐎 Read TextEditor::cursors directly to avoid allocation
This commit is contained in:
@@ -206,7 +206,7 @@ class TextEditorPresenter
|
||||
@state.content.cursors = {}
|
||||
return unless @hasRequiredMeasurements()
|
||||
|
||||
for cursor in @model.getCursors()
|
||||
for cursor in @model.cursors # using property directly to avoid allocation
|
||||
if cursor.isVisible() and @startRow <= cursor.getScreenRow() < @endRow
|
||||
pixelRect = @pixelRectForScreenRange(cursor.getScreenRange())
|
||||
pixelRect.width = @baseCharacterWidth if pixelRect.width is 0
|
||||
|
||||
Reference in New Issue
Block a user