T10: focus in and out reach a program under mode 1004; the window wears the program's title; a bell is logged and silent; the scrollback setting caps history and trims it live; Cmd-F finds in the scrollback with Ely's FindWidget, matches washed, Enter older, Shift-Enter newer, new output searched again
This commit is contained in:
11 files changed
+486
-35
No files matched your search
@@ -377,3 +377,28 @@ mod tests {
|
||||
assert_eq!((size.num_cols, size.num_lines), (2, 1));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod scrollback {
|
||||
use alacritty_terminal::{event::VoidListener, grid::Dimensions, vte::ansi::Processor};
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn the_setting_caps_history_and_a_change_trims_it() {
|
||||
let settings = Settings {
|
||||
scrollback: 5,
|
||||
..Settings::default()
|
||||
};
|
||||
let mut term = Term::new(config(&settings), &TermSize::new(10, 3), VoidListener);
|
||||
let mut parser: Processor = Processor::new();
|
||||
let lines: String = (1..=20).map(|line| format!("{line}\r\n")).collect();
|
||||
parser.advance(&mut term, lines.as_bytes());
|
||||
assert_eq!(term.grid().history_size(), 5);
|
||||
term.set_options(config(&Settings {
|
||||
scrollback: 2,
|
||||
..settings
|
||||
}));
|
||||
assert_eq!(term.grid().history_size(), 2);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user