aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ansi.rs3
-rw-r--r--src/term/mod.rs4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ansi.rs b/src/ansi.rs
index c37f2090..d2c255a5 100644
--- a/src/ansi.rs
+++ b/src/ansi.rs
@@ -330,6 +330,8 @@ pub enum ClearMode {
Above,
/// Clear entire terminal
All,
+ /// Clear 'saved' lines (scrollback)
+ Saved
}
/// Mode for clearing tab stops
@@ -709,6 +711,7 @@ impl<'a, H, W> vte::Perform for Performer<'a, H, W>
0 => ClearMode::Below,
1 => ClearMode::Above,
2 => ClearMode::All,
+ 3 => ClearMode::Saved,
_ => unhandled!(),
};
diff --git a/src/term/mod.rs b/src/term/mod.rs
index 08299987..4ee685b1 100644
--- a/src/term/mod.rs
+++ b/src/term/mod.rs
@@ -1443,7 +1443,9 @@ impl ansi::Handler for Term {
for cell in &mut self.grid[self.cursor.point.line][..self.cursor.point.col] {
cell.reset(&template);
}
- }
+ },
+ // If scrollback is implemented, this should clear it
+ ansi::ClearMode::Saved => return
}
}