Discard last recorded mouse movements in tester

This commit is contained in:
Héctor Ramón Jiménez 2025-08-27 04:19:08 +02:00
parent 14de69704d
commit d64cb0d9c1
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -152,6 +152,15 @@ impl<P: Program + 'static> Tester<P> {
return Task::none();
};
while let Some(Instruction::Interact(
instruction::Interaction::Mouse(instruction::Mouse::Move(
_,
)),
)) = self.instructions.last()
{
let _ = self.instructions.pop();
}
let (state, window) = emulator.into_state();
self.state = State::Ready { state, window };