summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/term/mod.rs
diff options
context:
space:
mode:
authorKirill Chibisov <wchibisovkirill@gmail.com>2019-11-04 22:41:13 +0300
committerChristian Duerr <contact@christianduerr.com>2019-11-04 20:41:13 +0100
commit2c671afb69fb97f94df9967e7ffcf07d5e6a7be1 (patch)
tree0333c0ee8bc6b1a10914af8c55448ae04d82bf5c /alacritty_terminal/src/term/mod.rs
parent93e87eb0f1858138113d4ecdfaa8bfac3c127a39 (diff)
downloadalacritty-2c671afb69fb97f94df9967e7ffcf07d5e6a7be1.tar.gz
alacritty-2c671afb69fb97f94df9967e7ffcf07d5e6a7be1.zip
Add UTF-8 mouse mode support
Fixes #1934.
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r--alacritty_terminal/src/term/mod.rs37
1 files changed, 20 insertions, 17 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index f7b37b23..570dc7f3 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -436,23 +436,24 @@ pub mod mode {
bitflags! {
pub struct TermMode: u16 {
- const SHOW_CURSOR = 0b000_0000_0000_0001;
- const APP_CURSOR = 0b000_0000_0000_0010;
- const APP_KEYPAD = 0b000_0000_0000_0100;
- const MOUSE_REPORT_CLICK = 0b000_0000_0000_1000;
- const BRACKETED_PASTE = 0b000_0000_0001_0000;
- const SGR_MOUSE = 0b000_0000_0010_0000;
- const MOUSE_MOTION = 0b000_0000_0100_0000;
- const LINE_WRAP = 0b000_0000_1000_0000;
- const LINE_FEED_NEW_LINE = 0b000_0001_0000_0000;
- const ORIGIN = 0b000_0010_0000_0000;
- const INSERT = 0b000_0100_0000_0000;
- const FOCUS_IN_OUT = 0b000_1000_0000_0000;
- const ALT_SCREEN = 0b001_0000_0000_0000;
- const MOUSE_DRAG = 0b010_0000_0000_0000;
- const MOUSE_MODE = 0b010_0000_0100_1000;
- const ALTERNATE_SCROLL = 0b100_0000_0000_0000;
- const ANY = 0b111_1111_1111_1111;
+ const SHOW_CURSOR = 0b0000_0000_0000_0001;
+ const APP_CURSOR = 0b0000_0000_0000_0010;
+ const APP_KEYPAD = 0b0000_0000_0000_0100;
+ const MOUSE_REPORT_CLICK = 0b0000_0000_0000_1000;
+ const BRACKETED_PASTE = 0b0000_0000_0001_0000;
+ const SGR_MOUSE = 0b0000_0000_0010_0000;
+ const MOUSE_MOTION = 0b0000_0000_0100_0000;
+ const LINE_WRAP = 0b0000_0000_1000_0000;
+ const LINE_FEED_NEW_LINE = 0b0000_0001_0000_0000;
+ const ORIGIN = 0b0000_0010_0000_0000;
+ const INSERT = 0b0000_0100_0000_0000;
+ const FOCUS_IN_OUT = 0b0000_1000_0000_0000;
+ const ALT_SCREEN = 0b0001_0000_0000_0000;
+ const MOUSE_DRAG = 0b0010_0000_0000_0000;
+ const MOUSE_MODE = 0b0010_0000_0100_1000;
+ const UTF8_MOUSE = 0b0100_0000_0000_0000;
+ const ALTERNATE_SCROLL = 0b1000_0000_0000_0000;
+ const ANY = 0b1111_1111_1111_1111;
const NONE = 0;
}
}
@@ -1867,6 +1868,7 @@ impl<T: EventListener> ansi::Handler for Term<T> {
ansi::Mode::ReportFocusInOut => self.mode.insert(TermMode::FOCUS_IN_OUT),
ansi::Mode::BracketedPaste => self.mode.insert(TermMode::BRACKETED_PASTE),
ansi::Mode::SgrMouse => self.mode.insert(TermMode::SGR_MOUSE),
+ ansi::Mode::Utf8Mouse => self.mode.insert(TermMode::UTF8_MOUSE),
ansi::Mode::AlternateScroll => self.mode.insert(TermMode::ALTERNATE_SCROLL),
ansi::Mode::LineWrap => self.mode.insert(TermMode::LINE_WRAP),
ansi::Mode::LineFeedNewLine => self.mode.insert(TermMode::LINE_FEED_NEW_LINE),
@@ -1908,6 +1910,7 @@ impl<T: EventListener> ansi::Handler for Term<T> {
ansi::Mode::ReportFocusInOut => self.mode.remove(TermMode::FOCUS_IN_OUT),
ansi::Mode::BracketedPaste => self.mode.remove(TermMode::BRACKETED_PASTE),
ansi::Mode::SgrMouse => self.mode.remove(TermMode::SGR_MOUSE),
+ ansi::Mode::Utf8Mouse => self.mode.remove(TermMode::UTF8_MOUSE),
ansi::Mode::AlternateScroll => self.mode.remove(TermMode::ALTERNATE_SCROLL),
ansi::Mode::LineWrap => self.mode.remove(TermMode::LINE_WRAP),
ansi::Mode::LineFeedNewLine => self.mode.remove(TermMode::LINE_FEED_NEW_LINE),