Added a method to get a snapshot of the current displayed buffer.