Merge pull request #5843 from atom/as-faster-select-all-on-folded-lines

Speed up `selectAll` on a buffer with many folded lines
This commit is contained in:
Nathan Sobo
2015-03-04 16:33:38 -08:00

View File

@@ -251,7 +251,8 @@ class Selection extends Model
# Public: Selects all the text in the buffer.
selectAll: ->
@setBufferRange(@editor.buffer.getRange(), autoscroll: false)
@editor.unfoldAll()
@setBufferRange(@editor.buffer.getRange(), autoscroll: false, preserveFolds: true)
# Public: Selects all the text from the current cursor position to the
# beginning of the line.