mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
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:
@@ -419,4 +419,10 @@ class DisplayBuffer
|
||||
logLines: (start, end) ->
|
||||
@lineMap.logLines(start, end)
|
||||
|
||||
getDebugSnapshot: ->
|
||||
lines = ["Display Buffer:"]
|
||||
for screenLine, row in @lineMap.linesForScreenRows(0, @getLastRow())
|
||||
lines.push "#{row}: #{screenLine.text}"
|
||||
lines.join('\n')
|
||||
|
||||
_.extend DisplayBuffer.prototype, EventEmitter
|
||||
|
||||
Reference in New Issue
Block a user