Skip to content

Commit

Permalink
Removed duplicate merge call
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanBulfin committed Dec 13, 2022
1 parent 51b1984 commit b60e9c7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions helix-core/src/selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,8 @@ impl Selection {

self.ranges.dedup_by(|curr_range, prev_range| {
if prev_range.to() == curr_range.from() {
if curr_range == &primary || prev_range == &primary {
primary = curr_range.merge(*prev_range);
}
*prev_range = curr_range.merge(*prev_range);
primary = *prev_range;
true
} else {
false
Expand Down

0 comments on commit b60e9c7

Please sign in to comment.