aboutsummaryrefslogtreecommitdiff
path: root/src/term/mod.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2017-01-01 18:28:49 -0800
committerJoe Wilm <joe@jwilm.com>2017-01-01 18:28:49 -0800
commit82bfc41af7d6eff384bdf95cedaf0d62b5450979 (patch)
treed49059a741b4d751d424f15cf3d33cd8042aaa14 /src/term/mod.rs
parenta86dfd1a113f62fb6c40ebf5fe80f30a60cdff99 (diff)
downloadalacritty-82bfc41af7d6eff384bdf95cedaf0d62b5450979.tar.gz
alacritty-82bfc41af7d6eff384bdf95cedaf0d62b5450979.zip
Add support for SGR mouse reporting
According to: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Diffstat (limited to 'src/term/mod.rs')
-rw-r--r--src/term/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs
index 319f7520..c93ec963 100644
--- a/src/term/mod.rs
+++ b/src/term/mod.rs
@@ -180,6 +180,8 @@ pub mod mode {
const APP_KEYPAD = 0b00000100,
const MOUSE_REPORT_CLICK = 0b00001000,
const BRACKETED_PASTE = 0b00010000,
+ const SGR_MOUSE = 0b00100000,
+ const MOUSE_MOTION = 0b01000000,
const ANY = 0b11111111,
const NONE = 0b00000000,
}
@@ -987,7 +989,9 @@ impl ansi::Handler for Term {
ansi::Mode::ShowCursor => self.mode.insert(mode::SHOW_CURSOR),
ansi::Mode::CursorKeys => self.mode.insert(mode::APP_CURSOR),
ansi::Mode::ReportMouseClicks => self.mode.insert(mode::MOUSE_REPORT_CLICK),
+ ansi::Mode::ReportMouseMotion => self.mode.insert(mode::MOUSE_MOTION),
ansi::Mode::BracketedPaste => self.mode.insert(mode::BRACKETED_PASTE),
+ ansi::Mode::SgrMouse => self.mode.insert(mode::SGR_MOUSE),
_ => {
debug_println!(".. ignoring set_mode");
}
@@ -1002,7 +1006,9 @@ impl ansi::Handler for Term {
ansi::Mode::ShowCursor => self.mode.remove(mode::SHOW_CURSOR),
ansi::Mode::CursorKeys => self.mode.remove(mode::APP_CURSOR),
ansi::Mode::ReportMouseClicks => self.mode.remove(mode::MOUSE_REPORT_CLICK),
+ ansi::Mode::ReportMouseMotion => self.mode.remove(mode::MOUSE_MOTION),
ansi::Mode::BracketedPaste => self.mode.remove(mode::BRACKETED_PASTE),
+ ansi::Mode::SgrMouse => self.mode.remove(mode::SGR_MOUSE),
_ => {
debug_println!(".. ignoring unset_mode");
}