Style nits

This commit is contained in:
Joe Wilm 2017-12-22 13:35:55 -08:00 committed by Joe Wilm
parent 09b78dc80a
commit 856770fed5
2 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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();