feat: Add buffer_mut method on Frame (#548)

This commit is contained in:
Dheepak Krishnamurthy 2023-09-30 08:53:37 -04:00 committed by GitHub
parent 2fd85af33c
commit 15641c8475
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -651,6 +651,11 @@ impl Frame<'_> {
pub fn set_cursor(&mut self, x: u16, y: u16) {
self.cursor_position = Some((x, y));
}
/// Gets the buffer that this `Frame` draws into as a mutable reference.
pub fn buffer_mut(&mut self) -> &mut Buffer {
self.buffer
}
}
/// `CompletedFrame` represents the state of the terminal after all changes performed in the last