fix(engine): fix clippy warning

This commit is contained in:
Federico Terzi 2021-11-04 21:38:59 +01:00
parent 7d5fd6aa8b
commit 5f1ec3719e

View File

@ -89,12 +89,11 @@ impl<'a> Middleware for UndoMiddleware<'a> {
}
*record = None;
}
} else if let EventType::Mouse(_) = &event.etype {
// Any mouse event invalidates the undo feature, as it could
} else if let EventType::Mouse(_) | EventType::CursorHintCompensation(_) = &event.etype {
// Explanation:
// * Any mouse event invalidates the undo feature, as it could
// represent a change in application
*record = None;
} else if let EventType::CursorHintCompensation(_) = &event.etype {
// Cursor hints invalidate the undo feature, as it would be pretty
// * Cursor hints invalidate the undo feature, as it would be pretty
// complex to determine which delete operations should be performed.
// This might change in the future.
*record = None;