diff options
author | Joe Wilm <joe@jwilm.com> | 2017-12-22 13:35:55 -0800 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-12-22 14:00:17 -0800 |
commit | 856770fed5e692a379296dd28d9ba3ef90e2ef4b (patch) | |
tree | 713f61f201ae6337d68c6c5e34f09816e8cd82ed /src | |
parent | 09b78dc80aef625dcf0796a59da33e7fdb94ba78 (diff) | |
download | alacritty-856770fed5e692a379296dd28d9ba3ef90e2ef4b.tar.gz alacritty-856770fed5e692a379296dd28d9ba3ef90e2ef4b.zip |
Style nits
Diffstat (limited to 'src')
-rw-r--r-- | src/input.rs | 7 | ||||
-rw-r--r-- | src/term/mod.rs | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/input.rs b/src/input.rs index 7521409c..bc172bca 100644 --- a/src/input.rs +++ b/src/input.rs @@ -365,7 +365,8 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> { } pub fn on_mouse_wheel(&mut self, delta: MouseScrollDelta, phase: TouchPhase) { - let modes = mode::MOUSE_REPORT_CLICK | mode::MOUSE_MOTION | mode::SGR_MOUSE | mode::ALT_SCREEN_BUF; + let modes = mode::MOUSE_REPORT_CLICK | mode::MOUSE_MOTION | mode::SGR_MOUSE | + mode::ALT_SCREEN; if !self.ctx.terminal_mode().intersects(modes) { return; } @@ -380,7 +381,7 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> { }; for _ in 0..(to_scroll.abs() as usize) { - if self.ctx.terminal_mode().intersects(mode::ALT_SCREEN_BUF) { + if self.ctx.terminal_mode().intersects(mode::ALT_SCREEN) { // Faux scrolling if code == 64 { // Scroll up one line @@ -415,7 +416,7 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> { 65 }; - if self.ctx.terminal_mode().intersects(mode::ALT_SCREEN_BUF) { + if self.ctx.terminal_mode().intersects(mode::ALT_SCREEN) { // Faux scrolling if button == 64 { // Scroll up one line diff --git a/src/term/mod.rs b/src/term/mod.rs index c5933236..3484bae1 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -428,7 +428,7 @@ pub mod mode { const ORIGIN = 0b0001000000000; const INSERT = 0b0010000000000; const FOCUS_IN_OUT = 0b0100000000000; - const ALT_SCREEN_BUF = 0b1000000000000; + const ALT_SCREEN = 0b1000000000000; const ANY = 0b1111111111111; const NONE = 0; } @@ -1790,7 +1790,7 @@ impl ansi::Handler for Term { trace!("set_mode: {:?}", mode); match mode { ansi::Mode::SwapScreenAndSetRestoreCursor => { - self.mode.insert(mode::ALT_SCREEN_BUF); + self.mode.insert(mode::ALT_SCREEN); self.save_cursor_position(); if !self.alt { self.swap_alt(); @@ -1820,7 +1820,7 @@ impl ansi::Handler for Term { trace!("unset_mode: {:?}", mode); match mode { ansi::Mode::SwapScreenAndSetRestoreCursor => { - self.mode.remove(mode::ALT_SCREEN_BUF); + self.mode.remove(mode::ALT_SCREEN); self.restore_cursor_position(); if self.alt { self.swap_alt(); |