Add 'editor:save-debug-snapshot' command. Closes #191.

This saves the state of the rendered lines, the display buffer, the
tokenized buffer, and the buffer to a file. If a problem arises with
rendering, hopefully we can use it to diagnose in which layer things
went awry.
This commit is contained in:
Kevin Sawicki & Nathan Sobo
2013-02-22 14:24:43 -07:00
parent 9ca7214d39
commit 5da5bf94b6
6 changed files with 70 additions and 12 deletions

View File

@@ -820,5 +820,11 @@ class EditSession
@displayBuffer.tokenizedBuffer.resetScreenLines()
grammarChanged
getDebugSnapshot: ->
[
@displayBuffer.getDebugSnapshot()
@displayBuffer.tokenizedBuffer.getDebugSnapshot()
].join('\n\n')
_.extend(EditSession.prototype, EventEmitter)
_.extend(EditSession.prototype, Subscriber)