aboutsummaryrefslogtreecommitdiff
path: root/src/term
diff options
context:
space:
mode:
authorDominik MiedziƄski <dominik@mdzn.pl>2017-05-08 16:50:34 +0200
committerJoe Wilm <jwilm@users.noreply.github.com>2017-05-08 08:38:01 -0700
commit5c6b7dd244e309067141a206c2e2518580068d9e (patch)
tree5e9bf879ad3c8b5e7d994efcfa15b517b2ca52c1 /src/term
parent08447a220c1bcf9d2e071798da3e1edcde9366cf (diff)
downloadalacritty-5c6b7dd244e309067141a206c2e2518580068d9e.tar.gz
alacritty-5c6b7dd244e309067141a206c2e2518580068d9e.zip
Fix Device Status reports
Diffstat (limited to 'src/term')
-rw-r--r--src/term/mod.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs
index e3510b11..0be0eb86 100644
--- a/src/term/mod.rs
+++ b/src/term/mod.rs
@@ -1240,8 +1240,18 @@ impl ansi::Handler for Term {
}
#[inline]
- fn device_status<W: io::Write>(&mut self, writer: &mut W) {
- let _ = writer.write_all(b"\x1b0n");
+ fn device_status<W: io::Write>(&mut self, writer: &mut W, arg: usize) {
+ trace!("device status: {}", arg);
+ match arg {
+ 5 => {
+ let _ = writer.write_all(b"\x1b[0n");
+ },
+ 6 => {
+ let pos = self.cursor.point;
+ let _ = write!(writer, "\x1b[{};{}R", pos.line + 1, pos.col + 1);
+ },
+ _ => debug!("unknown device status query: {}", arg),
+ };
}
#[inline]