rmux_core/screen/
history_bytes.rs1use super::Screen;
2
3impl Screen {
4 #[must_use]
6 pub fn tmux_history_bytes(&self) -> usize {
7 let counts = self.grid.tmux_history_byte_counts();
8 counts[1]
9 .saturating_add(counts[3])
10 .saturating_add(counts[5])
11 }
12
13 #[must_use]
15 pub fn tmux_history_all_bytes(&self) -> String {
16 let [lines, line_bytes, cells, cell_bytes, extended, extended_bytes] =
17 self.grid.tmux_history_byte_counts();
18 format!("{lines},{line_bytes},{cells},{cell_bytes},{extended},{extended_bytes}")
19 }
20}