From 15641c8475b7596c97a0affce0d6082c4b9586c2 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Sat, 30 Sep 2023 08:53:37 -0400 Subject: [PATCH] =?UTF-8?q?feat:=20Add=20`buffer=5Fmut`=20method=20on=20`F?= =?UTF-8?q?rame`=20=E2=9C=A8=20(#548)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/terminal.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/terminal.rs b/src/terminal.rs index 74df4aa517..3569b60976 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -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