aboutsummaryrefslogtreecommitdiff
path: root/src/grid/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/grid/mod.rs')
-rw-r--r--src/grid/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/grid/mod.rs b/src/grid/mod.rs
index 97614d71..535f6cc6 100644
--- a/src/grid/mod.rs
+++ b/src/grid/mod.rs
@@ -155,6 +155,13 @@ impl<T: Copy + Clone> Grid<T> {
self.line_to_offset(line) + self.display_offset
}
+ /// Update the size of the scrollback history
+ pub fn update_history(&mut self, history_size: usize, template: &T)
+ {
+ self.raw.update_history(history_size, Row::new(self.cols, &template));
+ self.scroll_limit = min(self.scroll_limit, history_size);
+ }
+
pub fn scroll_display(&mut self, scroll: Scroll) {
match scroll {
Scroll::Lines(count) => {