aboutsummaryrefslogtreecommitdiff
path: root/src/grid/storage.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/grid/storage.rs')
-rw-r--r--src/grid/storage.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/grid/storage.rs b/src/grid/storage.rs
index 1f71b5b5..f59b01b7 100644
--- a/src/grid/storage.rs
+++ b/src/grid/storage.rs
@@ -20,6 +20,13 @@ pub struct Storage<T> {
inner: Vec<T>,
zero: usize,
visible_lines: Line,
+
+ /// Total number of lines currently active in the terminal (scrollback + visible)
+ ///
+ /// Shrinking this length allows reducing the number of lines in the scrollback buffer without
+ /// having to truncate the raw `inner` buffer.
+ /// As long as `len` is bigger than `inner`, it is also possible to grow the scrollback buffer
+ /// without any additional insertions.
#[serde(skip)]
len: usize,
}