From 94b9345a26370fc02fa092016e59511a330f4cb4 Mon Sep 17 00:00:00 2001 From: Niklas Claesson Date: Wed, 26 Sep 2018 19:38:41 +0200 Subject: Implement CNL and CPL escape codes (#1590) --- src/term/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/term/mod.rs') diff --git a/src/term/mod.rs b/src/term/mod.rs index f6f53dbe..eefc432e 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -1467,12 +1467,16 @@ impl ansi::Handler for Term { #[inline] fn move_down_and_cr(&mut self, lines: Line) { - trace!("[unimplemented] move_down_and_cr: {}", lines); + trace!("move_down_and_cr: {}", lines); + let move_to = self.cursor.point.line + lines; + self.goto(move_to, Column(0)) } #[inline] fn move_up_and_cr(&mut self, lines: Line) { - trace!("[unimplemented] move_up_and_cr: {}", lines); + trace!("move_up_and_cr: {}", lines); + let move_to = Line(self.cursor.point.line.0.saturating_sub(lines.0)); + self.goto(move_to, Column(0)) } #[inline] -- cgit