diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index 1e443ce7ff0e..8c7a7bafaf2d 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -233,15 +233,7 @@ impl Prompt { position } Movement::StartOfLine => 0, - Movement::EndOfLine => { - let mut cursor = - GraphemeCursor::new(self.line.len().saturating_sub(1), self.line.len(), false); - if let Ok(Some(pos)) = cursor.next_boundary(&self.line, 0) { - pos - } else { - self.cursor - } - } + Movement::EndOfLine => self.line.len(), Movement::None => self.cursor, } }