Skip to content

Commit

Permalink
🐛 Fix reading tokens of lines after the last one
Browse files Browse the repository at this point in the history
  • Loading branch information
abe33 committed Nov 10, 2016
1 parent 5c7cce2 commit 1a01811
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/mixins/canvas-drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ export default class CanvasDrawer extends Mixin {
eachTokenForScreenRows (startRow, endRow, callback) {
const editor = this.getTextEditor()
const invisibleRegExp = this.getInvisibleRegExp()
endRow = Math.min(endRow, editor.getScreenLineCount())

for (let row = startRow; row < endRow; row++) {
editor.tokensForScreenRow(row).forEach(token => {
Expand Down

0 comments on commit 1a01811

Please sign in to comment.