Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Remove invariant check in updateSpatialIndex
Browse files Browse the repository at this point in the history
It didn’t end up being useful and costs us overhead.
  • Loading branch information
Nathan Sobo committed Feb 24, 2017
1 parent 7209ac5 commit 02a9e5e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/display-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -985,18 +985,6 @@ class DisplayLayer {
new Array(insertedScreenLineLengths.length)
)

if (global.atom && this.indexedBufferRowCount === this.buffer.getLineCount()) {
const lastScreenRow = this.getLastScreenRow()
const lastScreenColumn = this.lineLengthForScreenRow(lastScreenRow)
const translatedEndPosition = this.translateScreenPosition(Point(lastScreenRow, lastScreenColumn))
const expectedEndPosition = this.buffer.getEndPosition()
if (!translatedEndPosition.isEqual(expectedEndPosition)) {
global.atom.assert(false, 'Invalid spatial index state', {
lastScreenRow, lastScreenColumn, translatedEndPosition, expectedEndPosition
})
}
}

return {
start: Point(startScreenRow, 0),
oldExtent: Point(oldScreenRowCount, 0),
Expand Down

0 comments on commit 02a9e5e

Please sign in to comment.