diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-11-12 05:49:03 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-11-12 05:49:03 -0500 |
commit | 65ae6b2a7ae1ea835e127bf5bae55d939ab5085c (patch) | |
tree | 0c4f1318b8cbca33293e90d86db35051fbb5f814 /src/screen.rs | |
parent | 611e7c9d5c51616f5ba7cf428b2d32a35fcceba0 (diff) | |
download | vt100-rust-65ae6b2a7ae1ea835e127bf5bae55d939ab5085c.tar.gz vt100-rust-65ae6b2a7ae1ea835e127bf5bae55d939ab5085c.zip |
add a function to return whether the alternate screen is in use
Diffstat (limited to 'src/screen.rs')
-rw-r--r-- | src/screen.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/screen.rs b/src/screen.rs index 82d20b2..eaea554 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -662,6 +662,12 @@ impl Screen { self.attrs.inverse() } + /// Returns whether the alternate screen is currently in use. + #[must_use] + pub fn alternate_screen(&self) -> bool { + self.mode(MODE_ALTERNATE_SCREEN) + } + fn grid(&self) -> &crate::grid::Grid { if self.mode(MODE_ALTERNATE_SCREEN) { &self.alternate_grid |