mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
🐛 Delete partially off-screen markers which are empty
* 🔥 Delete old code which was used to support some non-batched methods in a previous version; * ✅ Cover “partially off-screen markers which are empty” scenario, since that code path was not hit by previous specs Fixes #7183
This commit is contained in:
@@ -1253,13 +1253,6 @@ class TextEditorPresenter
|
||||
range = marker.getScreenRange()
|
||||
|
||||
if decoration.isDestroyed() or not marker.isValid() or range.isEmpty() or not range.intersectsRowRange(@startRow, @endRow - 1)
|
||||
tileStartRow = @tileForRow(range.start.row)
|
||||
tileEndRow = @tileForRow(range.end.row)
|
||||
|
||||
for tile in [tileStartRow..tileEndRow] by @tileSize
|
||||
delete @state.content.tiles[tile]?.highlights[decoration.id]
|
||||
|
||||
@emitDidUpdateState()
|
||||
return
|
||||
|
||||
if range.start.row < @startRow
|
||||
@@ -1269,11 +1262,7 @@ class TextEditorPresenter
|
||||
range.end.row = @endRow
|
||||
range.end.column = 0
|
||||
|
||||
if range.isEmpty()
|
||||
tileState = @state.content.tiles[@tileForRow(range.start.row)]
|
||||
delete tileState.highlights[decoration.id]
|
||||
@emitDidUpdateState()
|
||||
return
|
||||
return if range.isEmpty()
|
||||
|
||||
flash = decoration.consumeNextFlash()
|
||||
|
||||
@@ -1307,8 +1296,6 @@ class TextEditorPresenter
|
||||
@visibleHighlights[tileStartRow] ?= {}
|
||||
@visibleHighlights[tileStartRow][decoration.id] = true
|
||||
|
||||
@emitDidUpdateState()
|
||||
|
||||
true
|
||||
|
||||
repositionRegionWithinTile: (region, tileStartRow) ->
|
||||
|
||||
Reference in New Issue
Block a user