File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4866,10 +4866,10 @@ fn increment_impl(cx: &mut Context, amount: i64) {
4866
4866
let mut last_change_to = 0 ;
4867
4867
4868
4868
// Overlapping changes will panic so we keep the earliest in the document of any
4869
- // that overlap. Selection ranges in the resulting doc will be only from changes that are
4870
- // kept.
4869
+ // that overlap. Selection ranges in the resulting doc will be only from changes
4870
+ // that are kept.
4871
4871
for change in maybe_changes. into_iter ( ) {
4872
- if changes. len ( ) == 0 || change. 0 >= last_change_to {
4872
+ if changes. is_empty ( ) || change. 0 >= last_change_to {
4873
4873
let length_diff =
4874
4874
( change. 2 . as_ref ( ) . unwrap ( ) . len ( ) as i128 ) - ( ( change. 1 - change. 0 ) as i128 ) ;
4875
4875
// Selection after increment is the first character of the new number.
@@ -4885,7 +4885,7 @@ fn increment_impl(cx: &mut Context, amount: i64) {
4885
4885
}
4886
4886
}
4887
4887
4888
- if changes. len ( ) > 0 {
4888
+ if ! changes. is_empty ( ) {
4889
4889
let new_selection_primary =
4890
4890
std:: cmp:: min ( selection. primary_index ( ) , new_selection_ranges. len ( ) - 1 ) ;
4891
4891
let new_selection = Selection :: new ( new_selection_ranges, new_selection_primary) ;
You can’t perform that action at this time.
0 commit comments