aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/index.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/index.rs')
-rw-r--r--alacritty_terminal/src/index.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/alacritty_terminal/src/index.rs b/alacritty_terminal/src/index.rs
index f6ea4ad3..7d1a8e91 100644
--- a/alacritty_terminal/src/index.rs
+++ b/alacritty_terminal/src/index.rs
@@ -59,6 +59,12 @@ impl From<Point<usize>> for Point<isize> {
}
}
+impl From<Point<usize>> for Point<Line> {
+ fn from(point: Point<usize>) -> Self {
+ Point::new(Line(point.line), point.col)
+ }
+}
+
impl From<Point<isize>> for Point<usize> {
fn from(point: Point<isize>) -> Self {
Point::new(point.line as usize, point.col)