aboutsummaryrefslogtreecommitdiff
path: root/src/ansi.rs
diff options
context:
space:
mode:
authorDominik MiedziƄski <dominik@mdzn.pl>2017-05-07 22:08:23 +0200
committerJoe Wilm <jwilm@users.noreply.github.com>2017-05-07 15:14:22 -0700
commit08447a220c1bcf9d2e071798da3e1edcde9366cf (patch)
tree2ad2b65ea6dac3b729b0777bd671a0d9fff9b081 /src/ansi.rs
parent573c5035efaf486a3fc56c05115df456fe053143 (diff)
downloadalacritty-08447a220c1bcf9d2e071798da3e1edcde9366cf.tar.gz
alacritty-08447a220c1bcf9d2e071798da3e1edcde9366cf.zip
Add support for Query Device Status
Diffstat (limited to 'src/ansi.rs')
-rw-r--r--src/ansi.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ansi.rs b/src/ansi.rs
index 18636760..a3f5c2d2 100644
--- a/src/ansi.rs
+++ b/src/ansi.rs
@@ -128,6 +128,9 @@ pub trait Handler {
/// TODO this should probably return an io::Result
fn identify_terminal<W: io::Write>(&mut self, &mut W) {}
+ // Report device status
+ fn device_status<W: io::Write>(&mut self, &mut W) {}
+
/// Move cursor forward `cols`
fn move_forward(&mut self, Column) {}
@@ -716,7 +719,7 @@ impl<'a, H, W> vte::Perform for Performer<'a, H, W>
handler.move_up(Line(arg_or_default!(idx: 0, default: 1) as usize));
},
'B' | 'e' => handler.move_down(Line(arg_or_default!(idx: 0, default: 1) as usize)),
- 'c' | 'n' => handler.identify_terminal(writer),
+ 'c' => handler.identify_terminal(writer),
'C' | 'a' => handler.move_forward(Column(arg_or_default!(idx: 0, default: 1) as usize)),
'D' => handler.move_backward(Column(arg_or_default!(idx: 0, default: 1) as usize)),
'E' => handler.move_down_and_cr(Line(arg_or_default!(idx: 0, default: 1) as usize)),
@@ -871,8 +874,7 @@ impl<'a, H, W> vte::Perform for Performer<'a, H, W>
i += 1; // C-for expr
}
}
- // TODO this should be a device status report
- // 'n' => handler.identify_terminal(writer),
+ 'n' => handler.device_status(writer),
'r' => {
if private {
unhandled!();