@@ -5002,16 +5002,20 @@ fn increment_impl(cx: &mut Context, increment_direction: IncrementDirection) {
50025002 overlapping_indexes.insert(i + 1);
50035003 }
50045004 }
5005− let changes = changes.into_iter().enumerate().filter_map(|(i, change)| {
5006− if overlapping_indexes.contains(&i) {
5007− None
5008− } else {
5009− Some(change)
5010− }
5011− });
5005+ let changes: Vec<_> = changes
5006+ .into_iter()
5007+ .enumerate()
5008+ .filter_map(|(i, change)| {
5009+ if overlapping_indexes.contains(&i) {
5010+ None
5011+ } else {
5012+ Some(change)
5013+ }
5014+ })
5015+ .collect();
50125016
5013− if changes.clone().count() > 0 {
5014− let transaction = Transaction::change(doc.text(), changes);
5017+ if !changes.is_empty() {
5018+ let transaction = Transaction::change(doc.text(), changes.into_iter());
50155019 let transaction = transaction.with_selection(selection.clone());
50165020
50175021 apply_transaction(&transaction, doc, view);