mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-11 04:48:44 +03:00
Un-F
This commit is contained in:
parent
7dc1490dee
commit
f466a2eede
@ -4,7 +4,7 @@ Buffer = require 'buffer'
|
||||
Range = require 'range'
|
||||
_ = require 'underscore'
|
||||
|
||||
fdescribe "TokenizedBuffer", ->
|
||||
describe "TokenizedBuffer", ->
|
||||
[editSession, tokenizedBuffer, buffer, changeHandler] = []
|
||||
|
||||
beforeEach ->
|
||||
|
@ -65,7 +65,7 @@ class TokenizedBuffer
|
||||
tokenizeNextChunk: ->
|
||||
rowsRemaining = @chunkSize
|
||||
|
||||
while @invalidRows.length and rowsRemaining > 0
|
||||
while @firstInvalidRow()? and rowsRemaining > 0
|
||||
invalidRow = @invalidRows.shift()
|
||||
lastRow = @getLastRow()
|
||||
continue if invalidRow > lastRow
|
||||
@ -86,7 +86,7 @@ class TokenizedBuffer
|
||||
@invalidateRow(row + 1) unless filledRegion
|
||||
@trigger "change", { start: invalidRow, end: row, delta: 0 }
|
||||
|
||||
@tokenizeInBackground()
|
||||
@tokenizeInBackground() if @firstInvalidRow()?
|
||||
|
||||
firstInvalidRow: ->
|
||||
@invalidRows[0]
|
||||
|
Loading…
Reference in New Issue
Block a user