aboutsummaryrefslogtreecommitdiffstats
path: root/src/grid.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-03 16:08:57 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-03 16:08:57 -0500
commit7958770a507d17e4beed17009206322c6d8fb7c0 (patch)
tree751d57929e56ec7d67c48b6c4f7a256de2f2dda1 /src/grid.rs
parent2f1eee8fcd050ac6e7411b700857e7c1db465d24 (diff)
downloadvt100-rust-7958770a507d17e4beed17009206322c6d8fb7c0.tar.gz
vt100-rust-7958770a507d17e4beed17009206322c6d8fb7c0.zip
decsc should also save graphic rendition and origin mode
Diffstat (limited to 'src/grid.rs')
-rw-r--r--src/grid.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/grid.rs b/src/grid.rs
index 571918b..cfb04de 100644
--- a/src/grid.rs
+++ b/src/grid.rs
@@ -6,6 +6,7 @@ pub struct Grid {
scroll_top: u16,
scroll_bottom: u16,
origin_mode: bool,
+ saved_origin_mode: bool,
}
impl Grid {
@@ -18,6 +19,7 @@ impl Grid {
scroll_top: 0,
scroll_bottom: size.rows - 1,
origin_mode: false,
+ saved_origin_mode: false,
}
}
@@ -58,12 +60,14 @@ impl Grid {
self.col_clamp();
}
- pub fn save_pos(&mut self) {
+ pub fn save_cursor(&mut self) {
self.saved_pos = self.pos;
+ self.saved_origin_mode = self.origin_mode;
}
- pub fn restore_pos(&mut self) {
+ pub fn restore_cursor(&mut self) {
self.pos = self.saved_pos;
+ self.origin_mode = self.saved_origin_mode;
}
pub fn rows(&self) -> impl Iterator<Item = &crate::row::Row> {