diff options
author | Niklas Claesson <nicke.claesson@gmail.com> | 2018-09-26 19:38:41 +0200 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2018-09-26 10:38:41 -0700 |
commit | 94b9345a26370fc02fa092016e59511a330f4cb4 (patch) | |
tree | 60c10aaadb648fad52e1a299c6b633f8c7539810 | |
parent | 2ef376bb7286ac0535487122260a817dd9b4d896 (diff) | |
download | alacritty-94b9345a26370fc02fa092016e59511a330f4cb4.tar.gz alacritty-94b9345a26370fc02fa092016e59511a330f4cb4.zip |
Implement CNL and CPL escape codes (#1590)
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/term/mod.rs | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 72e5edbb..7b233ee2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add support for changing the colors from 16 to 256 in the `indexed_colors` config section - Add `save_to_clipboard` configuration option for copying selected text to the system clipboard - New terminfo entry, `alacritty-direct`, that advertises 24-bit color support +- Add support for CSI sequences Cursor Next Line (`\e[nE`) and Cursor Previous Line (`\e[nF`) ### Changed 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] |