From 673710487afac8596a9f18fea9e04aeada32c2be Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Wed, 6 Apr 2022 13:06:39 +0300 Subject: Extract `SizeInfo` from alacritty_terminal The `SizeInfo` is a SizeInfo used for rendering, which contains information about padding, and such, however all the terminal need is number of visible lines and columns. --- alacritty_terminal/src/vi_mode.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'alacritty_terminal/src/vi_mode.rs') diff --git a/alacritty_terminal/src/vi_mode.rs b/alacritty_terminal/src/vi_mode.rs index 8a77b760..7f1d40ee 100644 --- a/alacritty_terminal/src/vi_mode.rs +++ b/alacritty_terminal/src/vi_mode.rs @@ -381,11 +381,12 @@ mod tests { use crate::ansi::Handler; use crate::config::Config; use crate::index::{Column, Line}; - use crate::term::{SizeInfo, Term}; + use crate::term::test::TermSize; + use crate::term::Term; fn term() -> Term<()> { - let size = SizeInfo::new(20., 20., 1.0, 1.0, 0.0, 0.0, false); - Term::new(&Config::default(), size, ()) + let size = TermSize::new(20, 20); + Term::new(&Config::default(), &size, ()) } #[test] -- cgit v1.2.3-54-g00ecf