Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
woojiq committed Sep 2, 2023
1 parent 557a34a commit f16a6c9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1298,12 +1298,8 @@ fn find_char_ret(

let pos = match (direction, inclusive) {
(Direction::Forward, true) => line_end_char_index(&text, find_on_line),
(Direction::Forward, false) => {
graphemes::prev_grapheme_boundary(text, line_end_char_index(&text, find_on_line))
}
(Direction::Backward, true) => {
graphemes::prev_grapheme_boundary(text, text.line_to_char(find_on_line))
}
(Direction::Forward, false) => line_end_char_index(&text, find_on_line) - 1,
(Direction::Backward, true) => line_end_char_index(&text, find_on_line - 1),
(Direction::Backward, false) => text.line_to_char(find_on_line),
};

Expand Down

0 comments on commit f16a6c9

Please sign in to comment.