Skip to content

Commit

Permalink
docs(frame): add docs about resize events (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka authored Dec 17, 2023
1 parent 1b8b626 commit 41c44a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,11 @@ pub struct Frame<'a> {
impl Frame<'_> {
/// The size of the current frame
///
/// This is guaranteed not to change when rendering.
/// This is guaranteed not to change during rendering, so may be called multiple times.
///
/// If your app listens for a resize event from the backend, it should ignore the values from
/// the event for any calculations that are used to render the current frame and use this value
/// instead as this is the size of the buffer that is used to render the current frame.
pub fn size(&self) -> Rect {
self.viewport_area
}
Expand Down

0 comments on commit 41c44a4

Please sign in to comment.