Register text decoration layer when initializing TokenizedBuffer

This commit is contained in:
Antonio Scandurra
2016-08-10 11:47:07 +02:00
parent 5d24bcf19e
commit 6ae263aed4

View File

@@ -46,7 +46,7 @@ class TokenizedBuffer extends Model
@disposables.add @grammarRegistry.onDidAddGrammar(@grammarAddedOrUpdated)
@disposables.add @grammarRegistry.onDidUpdateGrammar(@grammarAddedOrUpdated)
@disposables.add @buffer.preemptDidChange (e) => @handleBufferChange(e)
@disposables.add @buffer.registerTextDecorationLayer(this)
@disposables.add @buffer.onDidChangePath (@bufferPath) => @reloadGrammar()
if grammar = @grammarRegistry.grammarForScopeName(grammarScopeName)
@@ -241,7 +241,7 @@ class TokenizedBuffer extends Model
else if row > end
row + delta
handleBufferChange: (e) ->
bufferDidChange: (e) ->
if @lastBufferChangeEventId?
@assert(
@lastBufferChangeEventId is e.eventId - 1,