From 3a5ce3832beb159d657f9dd74b827c53be13d8d2 Mon Sep 17 00:00:00 2001 From: Joscha Date: Wed, 6 Nov 2024 22:16:47 +0100 Subject: [PATCH] Add Terminal::mark_dirty --- CHANGELOG.md | 3 +++ src/terminal.rs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7728464..352a2df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ Procedure when bumping the version number: ## Unreleased +### Added +- `Terminal::mark_dirty` + ## v0.2.3 - 2024-04-25 ### Fixed diff --git a/src/terminal.rs b/src/terminal.rs index 33c37fa..439ce4e 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -193,6 +193,12 @@ impl Terminal { &mut self.frame.widthdb } + /// Mark the terminal as dirty, forcing a full redraw whenever any variant + /// of [`Self::present`] is called. + pub fn mark_dirty(&mut self) { + self.full_redraw = true; + } + /// Display the current frame on the screen and prepare the next frame. /// /// Before drawing and presenting a frame, [`Self::measure_widths`] and