diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-04-06 13:06:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 13:06:39 +0300 |
commit | 673710487afac8596a9f18fea9e04aeada32c2be (patch) | |
tree | 1305e00422c01e35d91c533b12004c0082528eb4 /alacritty_terminal/src/term/search.rs | |
parent | 851dbc328efd9b212bb2c7b9caaf5763eb4e524b (diff) | |
download | alacritty-673710487afac8596a9f18fea9e04aeada32c2be.tar.gz alacritty-673710487afac8596a9f18fea9e04aeada32c2be.zip |
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.
Diffstat (limited to 'alacritty_terminal/src/term/search.rs')
-rw-r--r-- | alacritty_terminal/src/term/search.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/alacritty_terminal/src/term/search.rs b/alacritty_terminal/src/term/search.rs index e34fd1b4..5ee2cdce 100644 --- a/alacritty_terminal/src/term/search.rs +++ b/alacritty_terminal/src/term/search.rs @@ -510,8 +510,7 @@ mod tests { use crate::config::Config; use crate::index::{Column, Line}; - use crate::term::test::mock_term; - use crate::term::SizeInfo; + use crate::term::test::{mock_term, TermSize}; #[test] fn regex_right() { @@ -810,8 +809,8 @@ mod tests { #[test] fn wide_without_spacer() { - let size = SizeInfo::new(2., 2., 1., 1., 0., 0., false); - let mut term = Term::new(&Config::default(), size, ()); + let size = TermSize::new(2, 2); + let mut term = Term::new(&Config::default(), &size, ()); term.grid[Line(0)][Column(0)].c = 'x'; term.grid[Line(0)][Column(1)].c = '字'; term.grid[Line(0)][Column(1)].flags = Flags::WIDE_CHAR; |