mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-25 14:05:41 -05:00
Add documentation for len
field on Storage
Because the purpose of the `len` field wasn't obvious and collided with other uses (like Vec::len()), some additional documentation has added to make things a little easier to understand.
This commit is contained in:
parent
48c10676a4
commit
d62babe22f
1 changed files with 7 additions and 0 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue