From f16a6c95016bc91120c6d69064cb050b581f78ea Mon Sep 17 00:00:00 2001 From: woojiq Date: Sat, 2 Sep 2023 18:12:20 +0300 Subject: [PATCH] nits --- helix-term/src/commands.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 4a79f4b7c4090..48a9d96b03a12 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -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), };