mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
🐎 Skip decoration marker changes if caused by text changes
We’re already updating all decorations when text changes anyway, so marker changes caused by text changes don’t need to perform updates again.
This commit is contained in:
@@ -666,6 +666,8 @@ class TextEditorPresenter
|
||||
|
||||
decorationMarkerDidChange: (decoration, change) ->
|
||||
if decoration.isType('line') or decoration.isType('line-number')
|
||||
return if change.textChanged
|
||||
|
||||
intersectsVisibleRowRange = false
|
||||
startRow = @computeStartRow()
|
||||
endRow = @computeEndRow()
|
||||
@@ -685,6 +687,8 @@ class TextEditorPresenter
|
||||
@updateLineNumbersState() if decoration.isType('line-number')
|
||||
|
||||
if decoration.isType('highlight')
|
||||
return if change.textChanged
|
||||
|
||||
@updateHighlightState(decoration)
|
||||
|
||||
if decoration.isType('overlay')
|
||||
|
||||
Reference in New Issue
Block a user