message: [terminal] InputGenerator: Minor code cleanup.
diff: @@ -562,8 +562,7 @@ bool InputGenerator::generateMouse(MouseButton _button,
  Modifier _modifier,
  int _row,
  int _column,
  - MouseEventType _eventType
  -)
  + MouseEventType _eventType)
  {
  if (!mouseProtocol_.has_value())
  return false;
  @@ -749,15 +748,19 @@ bool InputGenerator::generate(MouseReleaseEvent const& _mouse)
  bool InputGenerator::generate(MouseMoveEvent const& _mouse)
  {
  - if (currentMousePosition_ != _mouse.coordinates())
  - {
  + if (!mouseProtocol_.has_value())
  + return false;
  +
  + if (currentMousePosition_ == _mouse.coordinates())
  + return true;
  +
  currentMousePosition_ = {_mouse.row, _mouse.column};
  - if (mouseProtocol_.has_value())
  - {
  bool const buttonsPressed = !currentlyPressedMouseButtons_.empty();
  +
  bool const report = (mouseProtocol_.value() == MouseProtocol::ButtonTracking && buttonsPressed)
  || mouseProtocol_.value() == MouseProtocol::AnyEventTracking;
  +
  if (report)
  return generateMouse(buttonsPressed ? *currentlyPressedMouseButtons_.begin() // what if multiple are pressed?
  : MouseButton::Release,
  @@ -765,8 +768,6 @@ bool InputGenerator::generate(MouseMoveEvent const& _mouse)
  _mouse.row,
  _mouse.column,
  MouseEventType::Drag);
  - }
  - }
  return false;
  }
  