Skip to content

Commit

Permalink
feat: Add buffer_mut method on Frame ✨ (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdheepak authored Sep 30, 2023
1 parent 2fd85af commit 15641c8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 15641c8

Please sign in to comment.