🐎 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:
Nathan Sobo
2015-02-11 19:41:29 -07:00
parent 2e20b30bb2
commit 6524da6594

View File

@@ -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')