Skip to content

Commit

Permalink
Found a terser way to respect selection direction
Browse files Browse the repository at this point in the history
  • Loading branch information
EpocSquadron authored and postsolar committed Apr 11, 2024
1 parent 751dfc5 commit 267bb65
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions helix-core/src/textobject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,7 @@ pub fn textobject_indentation_level(
new_char_end = new_char_end.saturating_sub(line_ending.len_chars());
}

match range.direction() {
Direction::Forward => Range::new(new_char_start, new_char_end),
Direction::Backward => Range::new(new_char_end, new_char_start),
}
Range::new(new_char_start, new_char_end).with_direction(range.direction())
}

pub fn textobject_pair_surround(
Expand Down

0 comments on commit 267bb65

Please sign in to comment.