mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-21 16:08:24 +03:00
Properly unsubscribe DisplayBuffer from Buffer on destruction
This commit is contained in:
parent
0dea901368
commit
cef25898bb
@ -31,8 +31,8 @@ class DisplayBuffer
|
||||
@buildLineMap()
|
||||
@tokenizedBuffer.on 'grammar-changed', (grammar) => @trigger 'grammar-changed', grammar
|
||||
@tokenizedBuffer.on 'changed', @handleTokenizedBufferChange
|
||||
@buffer.on 'markers-updated', @handleMarkersUpdated
|
||||
@buffer.on 'marker-created', @handleMarkerCreated
|
||||
@subscribe @buffer, 'markers-updated', @handleMarkersUpdated
|
||||
@subscribe @buffer, 'marker-created', @handleMarkerCreated
|
||||
|
||||
buildLineMap: ->
|
||||
@lineMap = new LineMap
|
||||
@ -537,7 +537,7 @@ class DisplayBuffer
|
||||
|
||||
destroy: ->
|
||||
@tokenizedBuffer.destroy()
|
||||
@buffer.off 'markers-updated', @handleMarkersUpdated
|
||||
@unsubscribe()
|
||||
|
||||
logLines: (start, end) ->
|
||||
@lineMap.logLines(start, end)
|
||||
|
Loading…
Reference in New Issue
Block a user