aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-07-03 17:12:16 -0700
committerJoe Wilm <joe@jwilm.com>2016-07-03 17:12:16 -0700
commit63098f210e142453e14158a62c6fe0116d5fb94f (patch)
treeffe312491eb1abc3af44dc252ce92e35bcfc7b1d
parentda19fa1940ded9b5beb99570cf314867cfa10fe6 (diff)
downloadalacritty-63098f210e142453e14158a62c6fe0116d5fb94f.tar.gz
alacritty-63098f210e142453e14158a62c6fe0116d5fb94f.zip
Remove now unused CursorExt
Since the addition of `Line` and `Column`, the CursorExt methods were essentially unused.
-rw-r--r--src/term.rs20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/term.rs b/src/term.rs
index 2a938226..2c30812b 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -124,23 +124,6 @@ pub const TAB_SPACES: usize = 8;
use grid::index::{Cursor, Column, Line};
-trait CursorExt {
- fn goto(&mut self, Line, Column);
- fn advance(&mut self, Line, Column);
-}
-
-impl CursorExt for Cursor {
- fn goto(&mut self, line: Line, col: Column) {
- self.col = col;
- self.line = line;
- }
-
- fn advance(&mut self, lines: Line, cols: Column) {
- self.col = self.col + cols;
- self.line = self.line + lines;
- }
-}
-
pub struct Term {
/// The grid
grid: Grid<Cell>,
@@ -433,7 +416,8 @@ impl ansi::Handler for Term {
#[inline]
fn goto(&mut self, x: i64, y: i64) {
println!("goto: x={}, y={}", x, y);
- self.cursor.goto(Line(y as usize), Column(x as usize));
+ self.cursor.line = Line(y as usize);
+ self.cursor.col = Column(x as usize);
}
#[inline]