🐛 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:
Antonio Scandurra
2015-06-09 21:35:01 +02:00
parent 7fe359ab4c
commit f73435e053
2 changed files with 6 additions and 14 deletions

View File

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