message: Add faux_scrolling back to scrollback
diff: @@ -441,8 +441,8 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> {
  65
  };
  - for _ in 0..(to_scroll.abs() as usize * SCROLL_MULTIPLIER) {
  - self.scroll_terminal(code, modifiers)
  + for _ in 0..(to_scroll.abs() as usize) {
  + self.scroll_terminal(code, modifiers, SCROLL_MULTIPLIER)
  }
  self.ctx.mouse_mut().lines_scrolled = to_scroll % 1.0;
  @@ -466,7 +466,7 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> {
  65
  };
  - self.scroll_terminal(code, modifiers)
  + self.scroll_terminal(code, modifiers, 1)
  }
  },
  _ => (),
  @@ -475,28 +475,31 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> {
  }
  }
  - fn scroll_terminal(&mut self, code: u8, modifiers: ModifiersState) {
  + fn scroll_terminal(&mut self, code: u8, modifiers: ModifiersState, scroll_multiplier: usize) {
  debug_assert!(code == 64 || code == 65);
  let faux_scrollback_lines = self.mouse_config.faux_scrollback_lines;
  let mouse_modes = TermMode::MOUSE_REPORT_CLICK | TermMode::MOUSE_DRAG | TermMode::MOUSE_MOTION;
  if self.ctx.terminal_mode().intersects(mouse_modes) {
  self.mouse_report(code, ElementState::Pressed, modifiers);
  - // } else if faux_scrollback_lines > 0 {
  - // // Faux scrolling
  - // let cmd = code + 1; // 64 + 1 = A, 65 + 1 = B
  - // let mut content = Vec::with_capacity(faux_scrollback_lines * 3);
  - // for _ in 0..faux_scrollback_lines {
  - // content.push(0x1b);
  - // content.push(b'O');
  - // content.push(cmd);
  - // }
  - // self.ctx.write_to_pty(content);
  - // }
  + } else if self.ctx.terminal_mode().contains(TermMode::ALT_SCREEN)
  + && faux_scrollback_lines > 0
  + {
  + // Faux scrolling
  + let cmd = code + 1; // 64 + 1 = A, 65 + 1 = B
  + let mut content = Vec::with_capacity(faux_scrollback_lines * 3);
  + for _ in 0..faux_scrollback_lines {
  + content.push(0x1b);
  + content.push(b'O');
  + content.push(cmd);
  + }
  + self.ctx.write_to_pty(content);
  } else {
  + for _ in 0..scroll_multiplier {
  self.ctx.scroll(-((code as isize) * 2 - 129));
  }
  }
  + }
  pub fn on_focus_change(&mut self, is_focused: bool) {
  if self.ctx.terminal_mode().contains(TermMode::FOCUS_IN_OUT) {
  