mirror of
https://github.com/atom/atom.git
synced 2026-02-07 13:14:55 -05: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,11 +419,6 @@ class Buffer
|
||||
return match[0][0] != '\t'
|
||||
undefined
|
||||
|
||||
logLines: (start=0, end=@getLastRow())->
|
||||
for row in [start..end]
|
||||
line = @lineForRow(row)
|
||||
console.log row, line, line.length
|
||||
|
||||
getRepo: -> @project?.repo
|
||||
|
||||
checkoutHead: ->
|
||||
@@ -442,4 +437,15 @@ class Buffer
|
||||
fileExists: ->
|
||||
@file.exists()
|
||||
|
||||
logLines: (start=0, end=@getLastRow())->
|
||||
for row in [start..end]
|
||||
line = @lineForRow(row)
|
||||
console.log row, line, line.length
|
||||
|
||||
getDebugSnapshot: ->
|
||||
lines = ['Buffer:']
|
||||
for row in [0..@getLastRow()]
|
||||
lines.push "#{row}: #{@lineForRow(row)}"
|
||||
lines.join('\n')
|
||||
|
||||
_.extend(Buffer.prototype, EventEmitter)
|
||||
|
||||
Reference in New Issue
Block a user