summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/selection.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-04-06 13:06:39 +0300
committerGitHub <noreply@github.com>2022-04-06 13:06:39 +0300
commit673710487afac8596a9f18fea9e04aeada32c2be (patch)
tree1305e00422c01e35d91c533b12004c0082528eb4 /alacritty_terminal/src/selection.rs
parent851dbc328efd9b212bb2c7b9caaf5763eb4e524b (diff)
downloadalacritty-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/selection.rs')
-rw-r--r--alacritty_terminal/src/selection.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/alacritty_terminal/src/selection.rs b/alacritty_terminal/src/selection.rs
index 669db6a2..09880c77 100644
--- a/alacritty_terminal/src/selection.rs
+++ b/alacritty_terminal/src/selection.rs
@@ -397,11 +397,12 @@ mod tests {
use crate::config::Config;
use crate::index::{Column, Point, Side};
- use crate::term::{SizeInfo, Term};
+ use crate::term::test::TermSize;
+ use crate::term::Term;
fn term(height: usize, width: usize) -> Term<()> {
- let size = SizeInfo::new(width as f32, height as f32, 1.0, 1.0, 0.0, 0.0, false);
- Term::new(&Config::default(), size, ())
+ let size = TermSize::new(width, height);
+ Term::new(&Config::default(), &size, ())
}
/// Test case of single cell selection.