mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-22 12:43:16 +00:00
feat: Add buffer_mut
method on Frame
✨ (#548)
This commit is contained in:
parent
2fd85af33c
commit
15641c8475
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue